Find k smallest elements in an array
Given an array arr[] and an integer k, the task is to find k smallest elements in the given array. Elements in the output array can be in any order. Examples: Input: arr[] = [1, 23, 12, 9, 30, 2, 50], k = 3Output: [1, 2, 9] Input: arr[] = [11, 5, 12, 9, 44, 17, 2], k = 2Output: [2, 5] Table of Conte