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. See original...
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,...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Hard PROBLEM STATEMENT(SIMPLIFIED): Given an array of N size containing the positions of N magnets. These magnets are repelling each other. The magnets on...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Easy PROBLEM STATEMENT(SIMPLIFIED): Given a sorted array of 0's and 1's of size N, find the first occurrence of 1 if present else return...
CONCEPTS USED: Searching DIFFICULTY LEVEL: Hard PROBLEM STATEMENT(SIMPLIFIED): Given a number N, find the smallest number that has same set-of-digits as N and is greater than N. If N is...
CONCEPTS USED: Hashing DIFFICULTY LEVEL: Easy PROBLEM STATEMENT(SIMPLIFIED): Given an array A with N integers and an integer K, print the smallest number in the array which occurs exactly K...
CONCEPTS USED: Binary Search DIFFICULTY LEVEL: Hard PROBLEM STATEMENT(SIMPLIFIED): Given an array A containing N elements, construct a new array countSmaller[] such that countSmaller[i] contains count of smaller elements on...
Concepts Used : Heap Difficulty Level : Easy Problem Statement : Given an array containing N integers, our task is to: Create min-heap with 1 based indexing. Remove the element...
Concepts Used: Heap Difficulty Level: Hard Problem Statement : Given a string str, find first K non-repeating characters in lexicographical order, if all the characters are repeating then print "Not...
Concepts Used: Heap Difficulty Level: Easy Problem Statement : Given an array containing N integers, our task is to create a min-heap using the elements of the given array and...
Concepts Used Heap Difficulty Level: Hard Problem Statement : Given N sectors and two integers P and Q, our task is to find Q closest sectors to P sector. See...
In the realm of data structures, heaps stand out as an essential tool for efficient manipulation of priority-based information. One common problem encountered when dealing with heaps is finding the...
Concepts Used Heap Difficulty Level Easy Problem Statement : Given an array arr[ ] and a number K where K is smaller than the size of the array, the task...
Concepts Used Heap Difficulty Level Medium Problem Statement : Given a string str and an integer q. We have to generate a string S such that it is lexicographically smallest...
Concepts Used Heap Difficulty Level Medium Problem Statement : We are given N book costs, and k amount of money. We need to find the maximum number of books we...
Concepts Used Heap Difficulty Level Easy Problem Statement : Given N integers where a[i] represent that a[i]th student has won the ith competition. Print top Q students who have won...
Concepts Used Sorting Difficulty Level Hard Problem Statement (Simplified): For given two arrays, print the score of First Array and Second Array such that their difference is maximum. Scoring can...
Concepts Used Sorting Difficulty Level Medium Problem Statement (Simplified): Print the total number of cases in which the current array sequence becomes Arithmetic Progression by adding a number at any...
Concepts Used Sorting Difficulty Level Medium Problem Statement (Simplified): We need to find the total number of steps need to make the current array of size N same as an...