how to perform this problem
How to do this question
@hhiteshbansal_40d12e2460a1738e,
- Make a priority queue where each node stores three values - the element itself , its row no. and its col no.
- Push the first elements of all the rows into this priority queue with their corresponding row and column info.
- One by one , take nodes out of this priority queue and insert their values into the final sorted array.
- Also push the next element of the same row using the other information into the priority queue.
- Repeat this process till the priority queue gets empty.
@hhiteshbansal_40d12e2460a1738e,
check this https://ide.codingblocks.com/s/655878 if u r having implementation difficulties