Basics Sorting Algorithm: BubbleSort (Python)
BubbleSort uses nested for loops in order to sort an array and therefore has a time complexity of O(n^2). That is slow, but it is still an important algorithm to know.
How it works:
Take array, arr = [54, 26, 93, 17, 77, 31, 44, 55, 20]
size, n = 9
B...
codingbasics.hashnode.dev3 min read