Khosro Raúl Soleimani

34%
Flag icon
D&C works by breaking a problem down into smaller and smaller pieces. If you’re using D&C on a list, the base case is probably an empty array or an array with one element. If you’re implementing quicksort, choose a random element as the pivot. The average runtime of quicksort is O(n log n)! The constant in Big O notation can matter sometimes. That’s why quicksort is faster than merge sort.
Grokking Algorithms: An illustrated guide for programmers and other curious people
Rate this book
Clear rating