1(xvii)
An array with 3 elements is arranged in a ascending order as follows:
Name the technique used:
- (a)Bubble sort
- (b)Linear Search
- (c)Selection sort
- (d)Binary Search
Show SolutionHide Solution↓
Bubble sort
Reason — The array is arranged in ascending order by repeatedly comparing and swapping adjacent elements. First, 4 and 1 are swapped to get 1 4 3, and then 4 and 3 are swapped to get 1 3 4. This step-by-step swapping of adjacent elements is the characteristic feature of Bubble Sort.