Find if it is possible to reach the end through given transitions
Given, n points on X-axis and the list of allowed transition between the points. Find if it is possible to reach the end from starting… Read More »
Given, n points on X-axis and the list of allowed transition between the points. Find if it is possible to reach the end from starting… Read More »
Given three integers a, b and c, find the first occurrence of c in a/b after the decimal point. If it does not exists, print… Read More »
Given n number of cashiers exchanging the money. At the moment, cashier had number of people in front of him. The person in the line… Read More »
There are several primality test available to check whether the number is prime or not like Fermat’s Theorem, Miller-Rabin Primality test and alot more. But… Read More »
Given is an array of n non-negative integers. The operation is to insert a number in the array which is strictly greater than current sum… Read More »
We have to paint n boards of length {A1, A2, .. An}. There are k painters available and each takes 1 unit time to paint… Read More »
Prerequisites: Sprague Gruncy theorem Grundy Numbers Nim is a famous game in which two players take turns removing items from distinct piles. During each turn,… Read More »
Rachel is submitting assignment from every student. She has given them a few minutes to arrange their assignments before submission. Just then Rahul remembers that… Read More »
Given the sum and xor of two numbers X and Y s.t. sum and xor , we need to find the numbers minimizing the value… Read More »
Pablo has square chocolate Box of size n x n in which a variety of healthy chocolates are present denoted by ‘H’ initially but he… Read More »
Given a positive integer, find the largest number that could be generated by swapping only two digits at most once. Examples: Input: 2736 Output :… Read More »
Given a string s, print all possible subsequences of the given string in an iterative manner. We have already discussed Recursive method to print all… Read More »
A STL based simple implementation of BFS using queue and vector in STL. The adjacency list is represented using vectors of vector. In BFS, we… Read More »
Prerequisites : Bitwise operators in C, Bitwise Hacks for Competitive Programming, Bit Tricks for Competitive Programming Compute XOR from 1 to n (direct method) :… Read More »
When it comes to Product Based Companies, they need good coders and one needs to clear the Competitive Coding round in order to reach the… Read More »