Amazon interview question

easy detecting a bit, reversing array etc