ques : https://leetcode.com/problems/merge-k-sorted-lists/
soln : https://ide.codingblocks.com/s/277805
what is my mistake here?
ques : https://leetcode.com/problems/merge-k-sorted-lists/
soln : https://ide.codingblocks.com/s/277805
what is my mistake here?
oh yeaah, the code is running now
still output is not correct
write ur own comparator.
in ur current code priority queue is comparing address .
or
u can store pair in ur priority queue
where pair.first= node data
and pair.second= node itself
okay thanku aman i will try to do it
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.