Book Allocation Problem Leetcode Python Compiler