Given an array arr[] of size N and an integer K, the task is to print all possible ways to split the given array into… Read More

# Category Archives: Stack

Given a string str consisting of pairs of balanced parentheses, the task is to calculate the score of the given string based on the following… Read More

Given an array arr[] of size N, the task to reverse the array using Stack. Examples: Input: arr[] = { 10, 20, 30, 40, 50… Read More

Given a string S consisting of ‘(‘, ‘)’, ‘[‘ and ‘]’, the task is to find the minimum count of remaining characters in the string… Read More

Given a string S of size N consisting of ‘(‘, ‘)’, and ‘$’, the task is to check whether the given string can be converted… Read More

Given two strings S1 and S2 of length N and M respectively, consisting of lowercase letters, the task is to find the minimum length to… Read More

Stack: A Stack is a linear data structure in which elements can be inserted and deleted only from one side of the list, called the… Read More

Given a Binary Tree, the task is to check if the given binary tree is a Binary Search Tree or not. If found to be… Read More

Given a binary string str of size N, the task is to minimize the length of given binary string by removing even length substrings consisting… Read More

Given an array arr[] of length N, the task is to modify the given array by replacing each element of the given array by its… Read More

Given a circular array arr[] consisting of N integers, the task is to print the Next Greater Element for every element of the circular array.… Read More

The stack is a linear data structure which works on the LIFO concept. LIFO stands for last in first out. In the stack, the insertion… Read More

Given an array arr[] consisting of N binary strings, the task is to count the number of strings that does not contain any Arc Intersection.… Read More

Given an array arr[] of length N, the task is to find the number of elements in array arr[] which contains at least one smaller… Read More

Given an array of strings arr[] representing the change folder operations(Unix-style) performed on the file system. Initially, the file system opens in the main folder.… Read More