Skip to content

Category Archives: Stack

Given a stack s, the task is to print the elements of the stack from bottom to top, such that the elements are still present… Read More
Given a linked list. The task is to reverse the order of the elements of the Linked List using an auxiliary Stack. Examples: Input :… Read More
Given an array arr[], the task is to find the sum of the minimum elements of every possible sub-array of the array. Examples: Input: arr[]… Read More
Given an array arr[], the task is to find the sum of the maximum elements of every possible sub-array of the array. Examples: Input: arr[]… 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 linked list containing N nodes and a positive integer k should be less than or equal to N. The task is to print… Read More
I applied for SSE position (Gurgaon Location) There were three rounds.. First round: Data Structures And Problem solving Level order traversal in spiral form Rotate… Read More
Given a binary array, where 1 denotes push operation and 0 denotes a pop operation in a stack or queue. The task is to check… Read More
Recommended: Please try your approach on {IDE} first, before moving on to the solution. Given an integer X and a binary tree, the task is… Read More
Given a string str, the task is to remove all the continuous occurrences of a and all occurrences of b and print the resultant string.… Read More
1. Subroutine – A set of Instructions which are used repeatedly in a program can be referred to as Subroutine. Only one copy of this Instruction… Read More
Given string str representing a logical expression which consists of the operators | (OR), & (AND),! (NOT) , 0, 1 and, only (i.e. no space… Read More
Given push[] and pop[] sequences with distinct values. The task is to check if this could have been the result of a sequence of push… Read More
Conversion of infix to postfix expression can be done elegantly using two precedence function. Each operator is assigned a value (larger value means higher precedence)… Read More
Given an array A of n integers. The task is to find the sum of minimum of all possible (contiguous) subarray of A. Examples: Input:… Read More