Water in a Tree
There is a tree consist of N nodes and N−1 edges. The ith node contains Si​ liters of water with a t...
Subtree MEX
You will be given a balanced binary tree of N nodes. Each of the nodes of the tree will contain a no...
Holy Tree
What is a tree? A tree is a bidirectional connected graph with no cycle. In a tree, we can create ...
Toph uses cookies. By continuing you agree to our Cookie Policy.