What is bubble sort algorithm?
Answer / Trapti Gupta
Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted. Here's some pseudocode:
1. Start from the first element of the list (except for the last one)
2. Compare the current element with the next one. If it is greater, swap them.
3. Move to the next pair of elements and repeat the process until you reach the end of the list.
4. Repeat the entire process from step 1, but now if there are no more swaps in a pass, the list is sorted.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is significance of ” * ” ?
Describe binary tree and its property.
Which are the sorted collections?
Why is quicksort better than mergesort?
What is data structure definition?
What is java priority queue?
How many sorting algorithms are there?
What is binary tree? Explain its uses.
What is the average number of comparisons needed in a sequential search to determine the position of an element in an array of 100 elements, if the elements are ordered from largest to smallest?
19 Answers ABB, SDE,
What is the difference between b tree and binary search tree?
Explain the implementation of an AVL tree and Binary tree.
What is a multidimensional array?