This blog Discusses the famous question “list reduction in linked list”. Linked list reduction plays an important role in improving your data structures like linked list. In linked list reduction,...
CONCEPTS USED: Basic Pointer Manipulation DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given a linked list of N nodes such that the list is sorted in two parts, the first part and...
CONCEPTS USED: Basic Pointer Manipulation DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given a linked list of N elements and a value X, your task is to arrange the list in such...
CONCEPTS USED: Basic Manipulation DIFFICULTY LEVEL: Easy PROBLEM STATEMENT(SIMPLIFIED): Given a linked list of N nodes, each node containing binary bit either 0 or 1 as a character. Your task...
Concepts Used Depth First Search, Disjoint Set Difficulty Level Medium Problem Statement : Given a 2D matrix, which contains only two numbers 0 or 1. In the map group of...
Concepts Used Breadth First Search Difficulty Level Easy Problem Statement : Given locations of X & Y islands, we need to find the minimum distance between a given pair of...
Concepts Used Breadth First Search Difficulty Level Hard Problem Statement : Given a graph we have to find the length of the shortest cycle in the given graph. If no...
Concepts Used Sorting Difficulty Level Medium Problem Statement (Simplified): Find the maximum possible median of provided odd-sized array where you can increase any element by one where each increment is...
Concepts Used Sorting Difficulty Level Easy Problem Statement (Simplified): Print the last number left in the array after deleting the largest number in the array then the smallest number repeatedly....
Concepts Used Depth First Search, Graph Difficulty Level Medium Problem Statement : Check whether the graph is a tree or not. See original problem statement here Solution Approach : Introduction...
Concepts Used Depth First Search, Disjoint Set Difficulty Level Medium Problem Statement : There are two clans numbered sequentially from 1 to N and given two integers, u and v...
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 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 Breadth First Search Difficulty Level Medium Problem Statement : Given an unweighted, undirected tree print the length of the longest path See original problem statement here Solution Approach...
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 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: 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...
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 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...
CONCEPTS USED: Searching, Basic Mathematics DIFFICULTY LEVEL: Hard PROBLEM STATEMENT(SIMPLIFIED): Given chocolates of 3 types A, B, C with their frequencies f_A,f_B and f_C, you need to pack these chocolates...