Algorithms
An algorithm is a finite procedure that solves a problem. Each page has pseudocode, a proof of correctness, the costs and code with tests.
All algorithms
- Binary search
Find a key in a sorted array. Compare the key with the middle item, and keep only the half that can hold the key.
10 languagesvisualintro - Insertion sort
Sort an array one item at a time. Take the next item and move it left until the item before it is not larger.
10 languagesvisualintro - Merge sort
Sort an array by divide and conquer. Sort each half, then merge the two sorted halves into one sorted array.
10 languagesvisualintro