Loading topic
n/2 were always a whole number and as if the base case never mattered. Real code doesn't behave that way. In the merge sort example, mid = len(xs) // 2 gives the left half ⌊n/2⌋ elements and the right half ⌈n/2⌉ elements. The exact recur7 min readn/b. Many real algorithms break that pattern. Deterministic linear-time selection (median of medians) recurses on about n/5 and 7n/10 elements. A quicksort that always splits 1:2 recurses on n/3 and 2n/3. The 5 min read