S&P Global Interview Question

0s and 1s separate out in an array