...

/

Challenge 2: Find k smallest elements in a List

Challenge 2: Find k smallest elements in a List

Try to solve the Find k Smallest Elements in a List problem.

Statement

Given an unsorted list lst and an integer k, find the k smallest elements from the list using a Heap.

Constraints:

  • 11 \leq lst.length 103\leq 10^3
...