Search
⌘K

Leetcode 2005. Subtree Removal Game with Fibonacci Tree

Two players alternately remove a chosen node's entire subtree from a recursively defined "Fibonacci tree" (whose sizes follow Fibonacci numbers); the last player to move wins. The task is to decide the winner (and/or count winning moves) by applying combinatorial game theory—compute or characterize Sprague–Grundy values using the tree's Fibonacci recursion to derive an efficient winning-strategy.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.