Amazon Interview Question

It was a leetcode question involving bit shifting and permutations.