What is a bubble sort and how do you perform it?
Answer / Shivalok Mishra
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.
1. Start from the beginning of the list.
2. Compare each pair of adjacent items and swap them if they are in the wrong order.
3. Repeat the process for the entire list until no more swaps are needed, indicating the list is sorted.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the goals of data structure?
How would you implement two stacks using a single array?
Define balancing condition for AVL Tree.
How can we reverse the order in the treemap?
What are the advantages and disadvantages of copyonwritearraylist?
What is circular queue example?
Write the advantage of separate chaining?
What are the types of Collision Resolution Techniques and the methods used in each of the type?
Write a Program for Insert in a sorted list
Are sets sorted?
What is the advantage of the heap over a stack?
Does concurrenthashmap allow null?