## Find total ways to reach the n’th stair from the bottom

Given a stair case, find total number of ways to reach the n’th stair from bottom of the stair when a person is only allowed to climb either 1 or 2 or 3 stairs at a time.

Coding made easy

Given a stair case, find total number of ways to reach the n’th stair from bottom of the stair when a person is only allowed to climb either 1 or 2 or 3 stairs at a time.

Write an efficient algorithm to construct a Cartesian tree from in-order traversal. A Cartesian tree is a binary tree with the heap property: the parent of any node has smaller value than the node itself.

Given a distinct sequence of keys which represents postorder traversal of a binary search tree, construct the tree from the postorder sequence.

Given a distinct sequence of keys which represents preorder traversal of a binary search tree (BST), construct the tree from the postorder sequence.

Given a linked list of strings, check whether concatenation of all values in the list together forms a palindrome. It is not permissible to construct a string out of the linked list nodes and check that string for palindrome.

Given a stack, sort it using recursion. The use of any other data structures (like containers in STL or Collections in Java) is not allowed.

Given a M x N matrix, count number of different ways to reach the bottom-right corner of a matrix from its top-left corner with exactly K turns allowed and using only the directions right or down.

Given a list which can grow in both horizontal and vertical directions (right and down), flatten it into a singly linked list. The conversion should be in such a way that down node is processed before the next node for any node.

Given a binary tree where each node has one extra pointer next, set next pointer to inorder successor for all nodes in the binary tree.

Given a binary tree, efficiently print all nodes between two given levels in a binary tree. The nodes for any level should be printed from left to right.

In this post, we will see how to sort N2 numbers in increasing order using a N x N Young tableau in O(N3) time.

A M x N Young tableau is an M x N matrix such that the entries of each row are in sorted order from left to right and the entries of each column are in sorted order from top to bottom. Some of the entries of a Young tableau may be infinity, which indicates an …