• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Top MCQs on BubbleSort Algorithm with Answers

Question 1

What is the best time complexity of bubble sort(optimised)?

  • N^2

  • NlogN

  • N

  • N(logN)^2

Question 2

The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 5, 13 in ascending order, using bubble sort is

  • 11

  • 12

  • 13

  • 10

Question 3

Assume that we use Bubble Sort to sort n distinct elements in ascending order. When does the best case of Bubble Sort occur?

  • When elements are sorted in ascending order

  • When elements are sorted in descending order

  • When elements are not sorted by any order

  • There is no best case for Bubble Sort. It always takes O(n*n) time

Question 4

What is the maximum number of comparisons that can take place when a bubble sort algorithm is implemented?, suppose there are n elements in the array.

  • n^2

  • n (n +1)

  • n(n-1)

  • (n*(n-1))/2

Question 5

What is the worst-case time complexity of the Bubble sort Algorithm?

  • O(NlogN)

  • O(N)

  • O(N^2)

  • None

Question 6

Bubble Sort is an example of a ______ sorting algorithm.

  • Comparison - based

  • Non-comparison-based

  • Linear

  • Exponential

Question 7

Bubble Sort is an example of a sorting algorithm that:

  • Uses divide and conquer strategy

  • Uses dynamic programming

  • Swaps adjacent elements directly

  • Only works with integers

Question 8

Which of the following statements is true regarding Bubble Sort?

  • It is the fastest sorting algorithm.

  • It is suitable for sorting large datasets.

  • It is an in-place sorting algorithm.

  • It has a time complexity of O(n log n) in all cases.

Question 9

In Bubble Sort, after each pass, the largest element among the unsorted elements "bubbles up" to which position? You may assume that the elements are being sorted in ascending order.

  • First

  • Last

  • Middle

  • Can't Say

Question 10

What is the main drawback of the Bubble Sort algorithm?

  •  It is not stable. 

  •  It is not comparison-based.

  • It has a high time complexity. 

  •   It is not adaptable to different data types.

There are 10 questions to complete.

Last Updated :
Take a part in the ongoing discussion