...
/Challenge 2: Finding “k” Smallest Elements in the Array
Challenge 2: Finding “k” Smallest Elements in the Array
Given an array and a number "k," write a function that returns the first "k" smallest elements by using a heap.
We'll cover the following...
Problem statement
Implement a function findKSmallest(int[] arr, int size, int k)
that takes an unsorted integer array as input and returns the “k” smallest elements in the array by using ...