Suppose, there are 2 stacks - Stack 1 containing the elements {2, 6 and 8} and Stack 2 containing the elements {7, 9 and 11}. Does the above algorithm work then?
Because, the min heap (or for that matter any other data structure), will contain the elements {2 and 7} in the 1st round. But then, this will put 2, and then 7 into the queue. 6 will come later. The approach might fail.