LeetCode Solutions

Tree

Recursive structure, subtree information, and ancestor-style reasoning. The focus here is postorder recursion and tree invariants. Official LeetCode problems are linked on every page instead of being mirrored here.

1 published solutions
3 distinct tags
0 easy / 1 medium / 0 hard difficulty mix
May 21, 2026 most recently updated page

Published pages in this category

Every page keeps the problem summary, recognition pattern, reasoning, pitfalls, and the exact C++ source used on the site.

Tree #01

Lowest Common Ancestor of a Binary Tree

Medium

Find the lowest node in a binary tree whose subtree contains both target nodes.

Solved treedfslowest common ancestor