Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Arrays Stack 24*7 Innovation Labs

Implement two stacks in an array

Create a data structure twoStacks that represents two stacks. Implementation of twoStacks should use only one array, i.e., both stacks should use the same array for s...
Stack Adobe Amazon

Design a stack that supports getMin() in O(1) time and O(1) extra space

Question: Design a Data Structure SpecialStack that supports all the stack operations like push(), pop(), isEmpty(), isFull() and an additional operation getMin() whi...
Arrays Stack Amazon

Next Greater Element

Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element on the right side of x ...
Stack Akosha Amazon

Largest Rectangular Area in a Histogram Set 2

Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that a...
Stack Strings Amazon

Check for balanced parentheses in an expression

Given an expression string exp , write a program to examine whether the pairs and the orders of “{“,”}”,”(“,”)&#x201...

Subscribe to Our Newsletter