Concepts Used Depth First Search, Disjoint Set Difficulty Level Easy Problem Statement : Given an undirected graph, print Yes if a cycle is present in the graph else print No....
Concepts Used: Stack. Difficulty Level: Medium. Problem Statement : Arnab is hosting a party but he has only k seats. Guest have come at different times and leave at different...
Concepts Used: DP/recursion and Stack. Difficulty Level: Hard. Problem Statement : Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and print...
Concepts Used: Stack. Difficulty Level: Easy. Problem Statement : Make the minimum number without repetition of the digits such that it follows the sequence given in the string. 'I' represents...
Concepts Used Breadth First Search, Disjoint Set Difficulty Level Easy Problem Statement : Given an undirected graph, print Yes if a cycle is present in the graph else print No....
Concepts Used Breadth First Search Difficulty Level Hard Problem Statement : Given a string , we are standing at the starting point and we have to reach end in minimum...
Concepts Used: Stacks. Difficulty Level: Medium. Problem Statement : Arnab is standing in a queue and he is irritated by the tall man standing after him, as he is obstructing...
Concepts Used Breadth First Search Difficulty Level Medium Problem Statement : Given an unweighted, undirected tree print the length of the longest path Solution Approach : Introduction : Path lenght...
Concepts Used Depth First Search, Disjoint Set Difficulty Level Medium Problem Statement : Given N number of vertices, M number of edges and relation between them to form an undirected...
Concepts Used: Stacks Difficulty Level: Easy. Problem Statement : Given a stack of integers, sort it in ascending order using another temporary stack. Solving Approach: Approach 1 ( Using temporary...
Concepts Used Stack Difficulty Level Easy Problem Statement : Given a string str of lowercase letters, a duplicate removal consists of choosing two adjacent and equal letters, and removing them....
Get minimum element from stack is a common problem in computer science. A stack is a data structure that follows the Last-In-First-Out (LIFO) principle, where elements are added and removed...
Concepts Used: Stack. Difficulty Level: Hard. Problem Statement : Nishant wants to buy a plot of land, which faces the beach. He will buy only a rectangular plot. So he...
Concepts Used Mathematics Difficulty Level Hard Problem Statement (Simplified): Calculate the sum for a given number n: Solving Approach : Bruteforce Approach: 1) We can use a double loop to...
Concepts Used: Stack Difficulty Level: Medium. Problem Statement : Find the minimum number of replacements required to make the given string of braces balanced. Example: Input: }{ {}{}{} {{{} Output:...
Concepts Used Heap Difficulty Level Hard Problem Statement : Given an array of N integers, we want to know whether it is possible to divide the students into contiguous groups...
Concepts Used Heap Difficulty Level Medium Problem Statement : Given an array A of size N, we have to perform following operations, untill only one integer remains (N-1 times) :...
Concepts Used Heap Difficulty Level Medium Problem Statement : We are given N elements with an integer S. We want to find such a sub-array that has the maximum possible...
Concepts Used: Queues. Difficulty Level: Medium. Problem Statement : Given a number N, print all possible binary numbers with decimal values from 1 to N, but the catch is you...
The queue is a linear data structure that follows the First-In-First-Out (FIFO) principle. Since queues maintain the order of insertion of elements and also remove elements in the same order...
Concepts Used: Hashing. Difficulty Level: Easy. Problem Statement : You are given a string str consisting of lowercase Latin letters. Find the first non-repeating character in str. Note: You have...
Concepts Used: Stacks. Difficulty Level: Medium. Problem Statement : Given a string of open angular bracket ‘<‘ and closed bracket ‘>’. The task is to find the length of longest...
Concepts Used Depth First Search Difficulty Level Hard Problem Statement : Given an undirected connected graph, you must find all the edges which when removed divide the graph. Solution Approach...
Concepts Used: Stacks Difficulty Level: Hard. Problem Statement : Sachin is teaching a group of N students. Now every student has an arrogance level. He make all the N students...
Concepts Used Basic operations of stack. Difficulty Level: Hard. Problem Statement : Nikhil now got a job. His task is to evaluate files. His boss comes and puts a file...
CONCEPTS USED: Hashing DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given an array of size N, which contains the voting ID's of students that have stood up for the elections for class...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given an array A of N integers, such that till a point these integers are strictly increasing and after that strictly...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Hard PROBLEM STATEMENT(SIMPLIFIED): Given number of chocolates in N different bags and M children. Every kid will get some consecutive bags. The task is...
Problem Statement (Simplified): For a given string S and number of rows R, we have to arrange each character on rows in a vertical zigzag format, and then print values...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given an array A, such that it is arranged in an Arithmetic Progression, but one element from this A.P. is missing,...