Computer Science
Discuss Bubble sort and Insertion sort techniques.
Python Data Handling
8 Likes
Answer
Bubble Sort :
In Bubble sort, the adjoining values are compared and exchanged if they are not in proper order. This process is repeated until the entire array is sorted.
Insertion Sort :
Insertion sort is a sorting algorithm that builds a sorted list one element at a time from the unsorted list by inserting the element at its correct position in sorted list.
Answered By
5 Likes
Related Questions
Create a dictionary named D with three entries, for keys 'a', 'b' and 'c'. What happens if you try to index a nonexistent key (D['d']) ? What does python do if you try to assign to a nonexistent key d.
(e.g., D['d'] = 'spam') ?What is sorting ? Name some popular sorting techniques.
What will be the output produced by following code fragments?
y = str(123) x = "hello" * 3 print (x, y) x = "hello" + "world" y = len(x) print (y, x)
What will be the output produced by following code fragments?
x = "hello" + \ "to Python" + \ "world" for char in x : y = char print (y, ' : ', end = ' ')