C++ Algorithm – Length of the longest valid sub string – Stack – Given a string consisting of opening and closing parenthesis.
Stack
How to efficiently implement k stacks in a single array – Stack – We have discussed space efficient implementation of 2 stacks in a single array.
Design a stack with operations on middle element – Stack – The idea is to use Doubly Linked List (DLL). We can delete middle element in O(1) time
Implement Stack using Queues – Stack – The problem is opposite of this post. We are given a Queue data structure that supports standard operations
Design and Implement Special Stack Data Structure – Stack – Design a Data Structure SpecialStack that supports all the stack operations
C++ Algorithm – The Stock Span Problem – Stack – The stock span problem is a financial problem where we have a series of n daily price quotes
C Algorithm – The Stock Span Problem – Stack – The stock span problem is a financial problem where we have a series of n daily price quotes
Java Algorithm – Next Greater Element – Stack – Given an array, print the Next Greater Element (NGE) for every element. The Next greater
Python Algorithm – Next Greater Element – Stack – Given an array, print the Next Greater Element (NGE) for every element.
C++ Algorithm – Next Greater Element – Stack – Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element