Absolute Permutation Hackerrank