The given array is arr = {3, 4, 5, 2, 1}. The number of iterations in bubble…

PYQ Tech Mahindra Hiring Assessment 2023

The given array is arr = {3, 4, 5, 2, 1}. The number of iterations in bubble sort and selection sort respectively are __________

  1. A.

    5 and 4

  2. B.

    4 and 5

  3. C.

    2 and 4

  4. D.

    2 and 5

Attempted by 317 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…