Write program for Bubble Sort ?
Answer / Samir Kumar Singh
Here is a simple implementation of bubble sort in Python:n```ndef bubble_sort(arr):n n = len(arr)n for i in range(n-1):n for j in range(0, n-i-1):n if arr[j] > arr[j+1]:n arr[j], arr[j+1] = arr[j+1], arr[j]n arr = [34, 2, 65, 87, 9, 78, 44, 55, 13, 44] nbubble_sort(arr)n print(arr)```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is list data structure?
Is bucket sort a comparison sort?
Can hashset contain duplicates?
What is sorting in data structure?
How many sorting are there in data structure?
What is the need for path compression?
How do you rotate an AVL tree?
Why do we use collections?
Which sort is best for linked list?
In tree construction which is the suitable efficient data structure? (a) Array (b) Linked list (c) Stack (d) Queue (e) none
Define a path in a tree?
What is time complexity of bubble sort?