हिंदी

A list has 12 elements. How many passes will a bubble sort algorithm make to sort the list?

Advertisements
Advertisements

प्रश्न

A list has 12 elements. How many passes will a bubble sort algorithm make to sort the list?

विकल्प

  • 12

  • 11

  • 6

  • 7

MCQ
Advertisements

उत्तर

11

Explanation:

To sort the list, n-1 passes are made, so for 12 elements, there will be 11 passes.

shaalaa.com
Bubble Sort in Python
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×