An algorithm I keep coming back to
medium.com