Absolute Permutation Hackerrank Solutions