Rearrange array to maximize positive prefix sums | SoFi Interview Question