📄️ Bubble Sort O(n^2)
\*Image from Algorithms
📄️ Insertion Sort O(n^2)
Although it is one of the elementary sorting algorithms with O(n2) worst-case time, insertion sort is the algorithm of choice either when the data is nearly sorted (because it is adaptive) or when the problem size is small (because it has low overhead).
📄️ Merge Sort O(n·log(n))
- Divide input array into subarrays
📄️ Sort Algorithms
Your browser does not support the video tag.