## Recursive solution to sort a stack

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.

Coding made easy

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.

In this post, we will see how to implement a queue using stack data structure in C++ and Java. In other words, design a queue that supports enqueue and dequeue operations using standard push and pop operations of the stack.

Write an efficient algorithm to find preorder traversal of a binary tree from its inorder and postorder sequence without constructing the tree.

Design a stack to support an additional operation which returns the minimum element from the stack in constant time. The stack should continue supporting all other operations like push, pop, top, size, empty, etc, with no degrade in performance for these operations.

Given a string consisting of opening and closing parenthesis, find the length of the longest balanced parenthesis in it.

In this post, we will see how to reverse an array in C++.

Given a binary tree, write an efficient algorithm to print right view of given binary tree.

In this post, we will discuss how to reverse a string using stack data structure.

Given a binary tree, write an iterative algorithm to print leaf to root path for every leaf node of binary tree. Use of Recursion is prohibited.

Given a binary tree, write an efficient algorithm to invert binary tree.

The longest increasing subsequence problem is to find a subsequence of a given sequence in which the subsequence’s elements are in sorted order, lowest to highest, and in which the subsequence is as long as possible. This subsequence is not necessarily contiguous, or unique.