Task: Implement O(k log k) Algorithm to Find kth Smallest Element from a Binary Heap
Task: Implement O(k log k) Algorithm to Find kth Smallest Element from a Binary Heap: a task in Terminal-Lego-15k (Harbor dataset). You are given an n-node min-binary heap (stored as an array) containing n distinct items, with the smallest item at the root. Your task is to implement an algorithm…
The task
You are given an n-node min-binary heap (stored as an array) containing `n` distinct items, with the smallest item at the root. Your task is to implement an algorithm that finds the **kth smallest element** from the heap in **O(k log k)** time complexity.
Part of PrimeIntellect/Terminal-Lego-15k.