Algorithm Create two arrays with in-order and post-order traversal for the given binary tree and call them in-order and post-order traversal respectively. Find the number of nodes in-between the given two nodes in the...

Note: We can do in-order traversal, which will give us a sorted array and then find the in-order successor very easily. But the time complexity of in-order traversal in O(n). Where as finding the...

Problem: Given stair case with n stairs, count the number of ways in which you can climb the stairs. Each time you can either take 1 step or 2 steps. Solution: — Number of...