The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag…

PYQ Infosys Hiring Test 2025

The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag variable)The number of iterations in selection sort and bubble sort respectively are __________

  1. A.

    5 and 4

  2. B.

    1 and 4

  3. C.

    0 and 4

  4. D.

    4 and 1

Attempted by 493 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…