Php Order Array By Subarray Leetcode Problem