Finding the smallest cube for which exactly five permutations of its digits are cube
Change this code:


boolean[] checked = new boolean[999];
Arrays.fill(checked, false);
for (int i = 1; i &lt; 999; i++) {
    if (!checked[i]) {



To this:

boolean[] checked = new boolean[999];
for (int i = 1; i &lt; checked.length; i++) {
    if (!checked[i]) { 


The benefits:


boolean[] has all false values by default, no need to fill
Instead of iterating until some number, iterate until the something with a name that is required for the loop to work correctly, in this case checked.length


Other minor things:


The convention for naming variables is camelCase instead of snake_case
Refer to types by interfaces. Instead of ArrayList&lt;int[]&gt; perms =, use List&lt;int[]&gt; perms =
The getPermutations method returns List&lt;int[]&gt;, but you never actually use the int[] values, you immediately convert them to an int using arrayToInt. It seems it would be better if the method returned List&lt;Integer&gt; where the value are already converted into a form that you actually need.