an array squareful sum pair adjacent element perfect squaregiven integer array num return number permutation num squarefultwo permutation perm1 perm2 different index perm1i perm2i Example 1input num 1178output 2explanation 1817 1781 valid permutationsExample 2input num 222output 1 constraints1 numslength 120 numsi 109