Amazon interview question

Code for finding number of consecutive 1s in a circular array.