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.
Find all unique combinations of distinct integers that sum up to a target value.
The goal is to find the length of the longest path between any two nodes in a binary tree.
Given a 2D grid representing an image, a starting pixel's coordinates, and a new color, change the color of the starting pixel and all…
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).