Trees and Graphs

LeetCode solutions for tree and graph problems

Home / LeetCode Solutions / Trees and Graphs

Trees and Graphs Problems

This section contains solutions to LeetCode problems involving trees, graphs, and related algorithms.

Maximum Depth of Binary Tree (Problem 104)

Find the maximum depth of a binary tree.

View on GitHub
Python Easy Tree DFS

Binary Tree Level Order Traversal (Problem 102)

Traverse a binary tree in level order (breadth-first).

View on GitHub
Python Medium Tree BFS

Number of Islands (Problem 200)

Count the number of islands in a 2D grid.

View on GitHub
Python Medium Graph DFS BFS