Amazon Interview Question

easy detecting a bit, reversing array etc