Tag: binary tree
Given a binary tree root, return the maximum width of any level in the tree. The width of a level is the number of nodes that can fit between …
Given a binary tree root, count and return the number of nodes where its value is greater than or equal to the values of all of its descendants. For …
Given a binary tree root, return the largest absolute difference between any node and its descendants. For example, given the following tree: 0 / \ 4 2 / \ …
In a binary tree, a lonely node is a node that is the only child of its parent node. The root of the tree is not lonely because it …
Given the root of a binary tree, each node has a value from 0 to 25 representing the letters ‘a’ to ‘z’: a value of 0 represents ‘a’, a …