Greedy algo.
Think this is the latest version.