Optimized the running current total. Once it hits the minimum, it will sort the end so that it skips the permutations afterward since it already knows that it's too much.