Category: recursive
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of …
Given a binary tree like this: 8 / \ 6 10 / \ / \ 5 7 9 11 Your task is to mirror it which becomes this: 8 …
Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf …
Recursion is an important programming concepts. Recursion can be used to simplify your algorithm implementation but at a cost of possible stack-over-flow pitfalls. This tutorial will provide a simple-to-follow …
A ‘Fractal Graph’ can be seen as ‘self similar’. For example, This is a fractal graph that is made by LOGO turtle graphic. Each element is a tiny star …