GeeksforGeeks » Interview Questions

Microsoft MBD interview question

(3 posts)
  • Started 3 months ago by gupta5035
  • Latest reply from PINTUGUPTAJUIT
  1. gupta5035
    Member
    Posted 3 months ago #

    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.

  2. DJ
    Member
    Posted 3 months ago #

    question not clear..plz explain with example

  3. PINTUGUPTAJUIT
    Member
    Posted 3 months ago #

    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.

RSS feed for this topic