@Dave - I have a doubt.. will we not incorporate the complexity we get for each while loop within the for loop..?? Basically complexity 2n right..?? another n because while loop runs for each misplaced number.. right?? which we take as O(n).. Have I understood it the right way??
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.