Amazon Interview Question

Does this shift still work for you?