/ blog/ posts
Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X.
Find the right side view of a binary tree, with step-by-step explanation and code examples in Python.
Find the lowest common ancestor of two nodes in a binary search tree, with step-by-step explanation and code examples in Python.
Check if a binary tree is a subtree of another tree, with step-by-step explanation and code examples in Python.
Check if two binary trees are the same, with step-by-step explanation and code examples in Python.
Invert a binary tree using recursive and iterative approaches, with step-by-step explanation and code examples in Python.