"You can't sort using push-pop-findmin."
 
@rajivmat
push --- 4, 5, 6, 1, 3, 2   - minarray = {0,3}
pop   -- 4, 5, 6, 1, 3        - minarray = {0,3}
pop  --  4, 5, 6, 1           - minarray = {0,3}
find_min  = 3rd element = 1
pop  -- 4, 5, 6               - minarray{0}    =(Now top = mintop so minarray is also popped)
find_min  = 0th element = 4
pop -- 4, 5                    - minarray ={0}
find_min  = 0th element = 4
 
Regards,
Prunthaban

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to