Greedy Algorithms — Avoid division comparisons in comparators

Soution to avoiding division comparisons