wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

A sort which compares adjacent elements in a list and switches where necessary is a

A
Insertion sort
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Heap Sort
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Quick Sort
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Bubble Sort
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution

The correct option is D Bubble Sort

A sort which compares adjacent elements in a list and switches where necessary is a bubble sort.


Bubble sort is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.


932510_918959_ans_6d3b54b821904d36b7a1788f5a671699.png

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Arch and Jaali
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon