I'm working on the famous tree of space problem, where we have an m-ary tree and can lock any node if none of its ancestors or descendants are already locked. I need to make t...