GeeksforGeeks » Interview Questions
Microsoft MBD interview question
(3 posts)-
You have given some plates. Width of each plate is different. Plate is arrange like stack. The only operation you can do is Flip. from upward you can go on any plate and flip that. You have to arrange the Plates in sorted order.Do it in Minimum time complexity.
-
question not clear..plz explain with example
-
it would take complexity
T(n)=O( n+n-1+n-2+.......+1 ) in worst case.. without using extra space
T(n)=O(n) in best case...
Reply
You must log in to post.