Microsoft Interview Question

find the consective 1s in an array