Binary Array Sorting Leetcode Premium