Please enable JavaScript.
Coggle requires JavaScript to display documents.
Algorithms (Sorting (Quick sort (O(n log n), O(n2), quite efficient for…
Algorithms
Sorting
Bubble sort O(n2)
After every iteration the highest values move to end
not suitable for large data sets
Insertion sort O(n2)
Selection sort O(n2)
Find min value and swap with the leftmost
not suitable for large data sets
Merge sort O(n log n)
Divide list into halves
Combine & keep sort
Shell sort O(n)
Quick sort
O(n log n)
O(n2)
quite efficient for large-sized data sets
choose pivot, partition and
Searching
Linear search O(n)
Binary search O(log n)
mid = lo + (hi-lo)/2
data < mid -> find in left path
data > mid -> find in right path
Interpolation search O(log (log n))
mid = lo + ( hi - lo ) / ( a[hi] - a[lo] ) * (x - a[lo])
Hash table
Recursion
Base criteria
Progressive approach