Book Allocation Problem Leetcode Hints