Book Allocation Problem Leetcode Number