Rabbits in Forest | Leetcode 781