Domanda di colloquio di Amazon

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