New Wikipedia article on an old algorithm, the Garsia–Wachs algorithm for finding optimal binary search trees (in the special case where you care about the heights of the leaves but not the internal nodes) or optimal alphabetic Huffman codes: https://en.wikipedia.org/wiki/Garsia%E2%80%93Wachs_algorithm