Merge k sorted linklist using minheap

question–>
https://practice.geeksforgeeks.org/problems/merge-k-sorted-linked-lists/1

code–>


i am submitting in gfg

not passing all testcases

Modified Code

there is small mistake in compare function
it should be
return a->data>b->data;

thanks @asaurabh_26 !

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.