This topic contains 0 replies, has 0 voices, and was last updated by  EduGorilla 1 year, 11 months ago.

  • Author
    Posts
  • #1440020 Reply
     EduGorilla 
    Keymaster
    Select Question Language :


    A stable sort preserves the order of values that are equal with respect to the comparison function. We have a list of three dimensional points
    [(7, 1, 8),(3, 5, 7),(6, 1, 4),(6, 5, 9),(0, 2, 5),(9, 0, 9)].
    We sort these in ascending order by the second coordinate. Which of the following corresponds to a stable sort of this input ?

    Options :-

    1. [(9, 0, 9),(7, 1, 8),(6, 1, 4),(0, 2, 5),(6, 5, 9),(3, 5, 7)]
    2. [(0, 2, 5),(3, 5, 7),(6, 1, 4),(6, 5, 9),(7, 1, 8),(9, 0, 9)]
    3. [(9, 0, 9),(7, 1, 8),(6, 1, 4),(0, 2, 5),(3, 5, 7),(6, 5, 9)]
    4. [(9, 0, 9),(6, 1, 4),(7, 1, 8),(0, 2, 5),(3, 5, 7),(6, 5, 9)]
    Post your Training /Course Enquiry
    Are You looking institutes / coaching center for
    • IIT-JEE, NEET, CAT
    • Bank PO, SSC, Railways
    • Study Abroad
    Select your Training / Study category
Reply To: A stable sort preserves the order of values that are equal with respect to the comparison function. ….
Your information:




Verify Yourself




Log in with your credentials

or    

Forgot your details?

Create Account