Microsoft interview question

find the consective 1s in an array