Skip to main content

14 docs tagged with "stack"

View all tags

Balanced Parentheses

The Balanced Parentheses problem involves determining whether a given string of parentheses is valid, meaning every opening bracket has a corresponding closing bracket in the correct order.

Balanced-parentheses-checker

This algorithm checks if the parentheses in a given expression are balanced using a stack to ensure each opening parentheses has a corresponding closing one.

Min Stack

A MinStack is a data structure that supports standard stack operations while efficiently retrieving the minimum element in constant time.

Monotonic Stack

Monotonic Stack is a data structure technique used to maintain elements in a particular order, typically increasing or decreasing, and is commonly used for solving problems involving range queries, such as finding the next greater element.

Monotonic Stack

Monotonic Stack is a data structure technique used to maintain elements in a particular order, typically increasing or decreasing, and is commonly used for solving problems involving range queries, such as finding the next greater element.

Stack Data Structure

A stack is a linear data structure that follows the Last In First Out (LIFO) principle. It allows operations to be performed at one end, called the top of the stack, making it efficient for scenarios such as expression evaluation, backtracking algorithms, and function call management.

Stack Permutation

A stack permutation is a reordering of an input sequence that can be achieved using a single stack with push and pop operations.

Stack Reversal

Reversing a stack involves changing the order of elements so that the bottom becomes the top and vice versa.

Stock Span Problem

The Stock Span Problem is a financial problem that calculates the span of stock's price on a given day.

String Reversal

This program reverses a given string by pushing its characters onto a stack and then popping them back into the string.

Trapping Rain Water

Documentation for the Trapping Rain Water algorithm to calculate water trapped between bars of varying heights.