Skip to main contentSkip to solution

Which of the following statements are correct?

(A) The bubble Sort technique sorts a given list of elements by repeatedly comparing the adjacent elements and swapping them if they are unordered.

(B) The process of placing or rearranging a collection of elements into a particular order is known as sorting.

(C) In selection Sort, the smallest element is selected from the unsorted array and swapped with the leftmost element.

(D) Complexity analysis does not depend on size of input.

Solution

✅ Correct Option: 2

Statements (A), (B) and (C) are correct.

(A) Bubble sort repeatedly compares adjacent elements and swaps them if they are in the wrong order.

(B) Sorting means placing or rearranging a collection of elements into a particular order, such as ascending or descending.

(C) Selection sort picks the smallest element from the unsorted part and swaps it with the leftmost unsorted position, which then becomes part of the sorted portion.


(D) is false because complexity analysis expresses time and space as a function of the input size nn. This is why we write O(n2)O(n^2) for bubble sort and selection sort.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question