Balanced Binary Tree
Determine if a given binary tree is height-balanced, meaning the heights of the two subtrees of every node never differ by more than one.
Determine if a given binary tree is height-balanced, meaning the heights of the two subtrees of every node never differ by more than one.
Given the root of a binary tree, return the values of its nodes level by level, from left to right.
The goal is to find the length of the longest path between any two nodes in a binary tree.
Implement a Trie data structure for efficient string storage and prefix searching.
Given the root of a binary tree, invert the tree by swapping its left and right children at each node.
Find the lowest common ancestor (LCA) of two given nodes, `p` and `q`, in a Binary Search Tree (BST).
Find the deepest node shared by two given nodes in a binary tree.
Given the root of a binary tree, determine the maximum depth.
Determine if a given binary tree is a valid binary search tree (BST).