All content related to dfs-traversal

Find the Maximum Depth or Height of a Tree

Given a binary tree, write a program to find the height of it. A binary tree's height or depth is the total number of nodes or edges on the longest path from the root node to the leaf node.

Merge Two Binary Tree

Given two binary trees, merge them into a new binary tree such that if two nodes overlap then add them and put them into the new tree at the same location else put the non-NULL node in the new tree.

Our weekly newsletter

Subscribe to get free weekly content on data structure and algorithms, machine learning, system design, oops and math. enjoy learning!