Book Allocation Problem Leetcode Binary Trees