Trees
This section contains info and problems on Trees
Most of the problems in Trees can be solved by using the FAITH technique of Recursion or TRAVEL AND SOLVE technique. So, if you get familiar with these two and understand how they work, it becomes extremely easy for you to solve most of the Trees problems.
🙇♂️ FAITH technique of Recursion:
As it is known that most of the Trees problems can be solved using Recursion, we blindly believe that the function returns the desired output for the left and right subtrees of the root node. After getting those outputs, we write the rest of the logic including the base condition.
Thanks to pepcoding's Sumeet Malik sir who explained these two concepts very easily in his YouTube channel. Here is their Binary Trees playlist
Last updated