Minimum Page Allocation Leetcode Sql