keeps only best three at each stage (doesn't always give correct answer)
store letter-sorting array into static array instead of creating new ones
Fixed typos with better estimation
Added greedy estimate