sir giving wrong answer in test case2.Pl tell mistake in the code
Merge k sorted arrays questions
Hello @ayush15goel,
As you are inserting elements column wise in the priority queue, it is failing for the testcases of kind:
2 4
5 6 7 8
1 2 3 4
Expected Output:
1 2 3 4 5 6 7 8
Your Output:
1 5 2 6 3 7 4 8
Hope, this would help.
Give a like, if you are satisfied.
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.