Skip to content

Category Archives: Stack

Given an array arr[], the task is to count the number of triplets such that i < j <k and a[ j ]< a[ k… Read More
Given an array arr[] of N integers, the task is to find the maximum possible value of (min * sum) among all possible subarrays having… Read More
Given two flavors of ice-cream chocolate and vanilla denoted by 0 and 1 respectively. People are standing in queue to get their desired flavor of… Read More
Given string str that contains only digits, the task is to return an expression by inserting the ‘+’ or ‘*’ operator between every two digits… Read More
Given two strings S1 and S2 consisting of unique characters, the task is to check S1 can be formed by repeated insertions of string S2.… Read More
Given a string S, the task is to find the lexicographically largest subsequence that can be formed using all distinct characters only once from the… Read More
Given a Binary tree, and target sum as K, the task is to print all the possible paths from root to leaf that has the… Read More
Given a stack S, the task is to copy the content of the given stack S to another stack T maintaining the same order. Examples:Attention… Read More
Given an array arr[] consisting of N integers, the task is to find the number of subarrays starting or ending at an index i such… Read More
Given two positive integers X and Y and two numeric strings S and P of length N and 2 respectively, the task is to find… Read More
Given a Binary Tree, the task is to print the Bottom-left to Upward-right Traversal of the given Binary Tree i.e., the level order traversal having… Read More
In this article, we will discuss how to implement a Stack using list in C++ STL. Stack is a linear data structure which follows. LIFO(Last… Read More
Given a string S size of N consisting of characters ‘a‘, ‘b‘, and ‘c‘ only, the task is to check if the given string can… Read More
Given an array arr[] consisting of N distinct integers. For each i (0 ≤ i < n), find a range [l, r] such that A[i]… Read More
Design a special dynamic Stack using an array that supports all the stack operations such as push(), pop(), peek(), isEmpty(), and getMin() operations in constant… Read More

Start Your Coding Journey Now!