Bhai dimmag khul gaya while loop ke ander ka logic explain krdo koi.
Bhai log ye while loop ke inside me logic pura upar se gaya
I will walk through the entire solution again here
- Create an output array.
- Create a min heap of size k and insert 1st element in all the arrays into the heap
- Repeat following steps while priority queue is not empty.
……a) Remove minimum element from heap (minimum is always at root) and store it in output array.
……b) Insert next element from the array from which the element is extracted. If the array doesn’t have any more elements, then do nothing.
in the code format with comments
https://ide.codingblocks.com/s/221093
another video explanation
i hope all of these three combined will help you clear your doubt
if your doubt is solved, please mark it as resolved