Amazon interview question

Does this shift still work for you?