## Find number of subarrays ending with arr[i] where arr[i] is the minimum element of that subarray

Given an array, arr[] of size N, the task is to find the number of sub-arrays ending with arr[i] and arr[i] is the minimum element… Read More »

- Stack of Pair in C++ STL with Examples
- C/C++ program for calling main() in main()
- Iterative Postorder Traversal of N-ary Tree
- Range Sum and Update in Array : Segment Tree using Stack
- Minimum steps required to make an array decreasing
- Append the elements of queue in mirror-inverse order
- Maximum XOR value of maximum and second maximum element among all possible subarrays
- Reverse substrings between each pair of parenthesis
- Largest row-wise and column-wise sorted sub-matrix
- Static and Dynamic data structures in Java with Examples
- Print all K-sum levels in a Binary Tree
- Generate Complete Binary Tree in such a way that sum of non-leaf nodes is minimum
- Sort array such that absolute difference of adjacent elements is in increasing order
- Program to convert Infix notation to Expression Tree
- Difference between Stack and Array
- Parsing String of symbols to Expression
- Find number of subarrays ending with arr[i] where arr[i] is the minimum element of that subarray
- Output of Java Programs | Set 55 (Java Collections Framework)
- Maximum of XOR of first and second maximum of all subarrays
- Find the number of unique pairs satisfying given conditions
- Minimum integer that can be obtained by swapping adjacent digits of different parity
- Minimum operation required to make a balanced sequence
- Reverse the elements only at odd positions in the given Array
- Stack machine in Computer Organisation

Given an array, arr[] of size N, the task is to find the number of sub-arrays ending with arr[i] and arr[i] is the minimum element… Read More »

Instruction formats are classified into different types depending upon the CPU organization. CPU organization is again classified into three types based on internal storage: Stack… Read More »

Given an integer N, the task is to find the minimum integer that can be obtained from the given integer such that the adjacent digits… Read More »

Given an array arr[] of distinct positive elements, the task is to find the number of unique pairs (a, b) such that a is the… Read More »

Given an expression as a string str consisting of numbers and basic arithmetic operators(+, -, *, /), the task is to solve the expression. Note… Read More »

Given an N * M matrix mat[][], the task is to find the area-wise largest rectangular sub-matrix such that each column and each row of… Read More »

Given an array arr[] of N distinct positive integers, let’s denote max(i, j) and secondMax(i, j) as the maximum and the second maximum element of… Read More »

Given a string str that consists of lower case English letters and brackets. The task is to reverse the substrings in each pair of matching… Read More »

Given an N-ary tree, the task is to find the post-order traversal of the given tree iteratively. Examples: Input: 1 / | \ 3 2… Read More »

Given a string str consisting of lowercase and uppercase characters, the task is to find the minimum possible length the string can be reduced to… Read More »

Given a stack of integers and an integer K, the task is to sort the elements of the given stack using another stack in the… Read More »

Given a bracket sequence as a string str, the task is to find whether the given string can be balanced by moving at most one… Read More »

Given N ranges [L, R] and an integer K, the task is to check if there are any K ranges which overlap at any point.… Read More »

A stack is a linear data structure that stores items in a Last-In/First-Out (LIFO) or First-In/Last-Out (FILO) manner. In stack, a new element is added… Read More »

Given a string consisting of lower case alphabets. Rules of the Game: A player can choose a pair of similar consecutive characters and erase them.… Read More »