## Check if an Array is Stack Sortable

Problem Statement You will be given an array A of integers containing N elements. All the elements inside the array are unique and in the range of 1 to N,...

## Count Subarrays where Second Highest lies before Highest

Problem Statement You will be given an array of N distinct elements. The minimum value of N is 2. In every subarray of the given array, you have to find...

## Reverse Individual Words

Problem Statment You are given a string. This string contains many words that are space separated. You have to reverse each word in the string individually. Examples The input string...

## Delete Middle Element of the Stack

Problem statement Given a stack of integers , delete the middle element of the stack using only standard stack operations like push , pop , size , empty . If...

## Sort an array using stacks

Problem statement Given an array of integers of size N , sort it in increasing order using a stack. Example : Sample input : 4 2 3 1 5 Sample...

## Delete Array Elements Which Are Smaller Than Next Or Become Smaller

Problem statement Given an array of integers of size n . You have to delete every element which is smaller than the next element or become smaller than the next...

## Check If A Queue Can Be Sorted Into Another Queue Using A Stack

Problem statement Given a queue having N numbers . Numbers in the queue is a permutation of first N natural numbers (1 to N) . You have to find out...