IN THE ABOVE QUESTION I USED min_heap but
when i dry run the test case for my solution …i found that
my answer for first test case is wrong.
why?—
first line represent test case followed by n and k
and then n elements
link for code-- https://ide.codingblocks.com/s/319682
2
5 2
12 5 787 1 23
7 3
1 23 12 9 30 2 50