S&P Global interview question

0s and 1s separate out in an array