Https://ide.codingblocks.com/s/442686

merge k sorted array using heap
i am getting wrong answer

sorry its of k samllest element in sorted 2d array

for the kth samllest element in sorted 2d array

@shashankmaheshwari054 i think your code is correct.
where are you submitting this?

for the input 16 i think i am getting wrong answer

@shashankmaheshwari054 this is because you are not marking the nodes as visited.
check this code:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.