Description
Doing some performance tests it was found that LinkedList create and discard lots of instances of LinkedList.EntrySet. Use an ArrayList is better because it does not create such instances, improving code speed and reducing memory footprint. Note use LinkedList was a good idea because that makes easier to think about algorithm itself, but since that part of the code is pretty stable and have , we can change it without problem.