Permuted multiples is a problem in which one must find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits.

A brute-force solution is to just loop through integers until 2x, 3x, 4x, 5x, and 6x are permuations of one another, when that happens we have found our integer.

I have used the method below to find is two integers are permutations of one another. Basically, we create an array of numbers which will have indices 0 to 9, and then count how many occurrences are in the first integer. Then, we just do the inverse to the second integer and if they are permuations then the array should be all zeros.

The full solution can be found here.