## Number of ways to distribute N Paper Set among M students

Given N students and a total of M sets of question paper where M ≤ N. All the M sets are different and every sets… Read More »

- What is Competitive Programming and How to Prepare for It?
- Why Should I Learn Coding?
- Lexicographically Smallest Topological Ordering
- Find the number of pair of Ideal nodes in a given tree
- Sum of digits with even number of 1's in their binary representation
- Equal Sum and XOR of three Numbers
- Check which player visits more number of Nodes
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Make the list non-decreasing by changing only one digit of the elements
- Print the path between any two nodes of a tree | DFS
- Convert an unbalanced bracket sequence to a balanced sequence
- Nth XOR Fibonacci number
- Write a function to get the intersection point of two Linked Lists | Set 2
- Print all the permutation of length L using the elements of an array | Iterative
- Number of substrings that start with "geeks" and end with "for"
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Reversing a Queue using another Queue
- Minimum increment or decrement operations required to make the array sorted
- Check if the rows of a binary matrix can be made unique by removing a single column
- Number of Subarrays with positive product
- Queries for the minimum element in an array excluding the given index range
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Print nodes having maximum and minimum degrees
- Color all boxes in line such that every M consecutive boxes are unique
- Minimize the sum of the array according the given condition
- Count of triples (A, B, C) where A*C is greater than B*B
- Find two co-prime integers such that the first divides A and the second divides B
- Sum of all natural numbers from L to R ( for large values of L and R )

Given N students and a total of M sets of question paper where M ≤ N. All the M sets are different and every sets… Read More »

Gennady Korotkevich, Petr Mitrichev, Adam D’Angelo…. Have you heard the above name ever…?? Let me tell you who they are… First two people (Gennady Korotkevich,… Read More »

Given an integer N and a base number A, the task is to check whether N is a Euler Pseudoprime to the given base A.… Read More »

Given an array arr[] of N elements and an integer K, the task is to find the number of non-decreasing sub-arrays of length less than… Read More »

Consider n points on the Cartesian Coordinate Plane. Let point (Xi, Yi) is given a value Vi. A line parallel to y-axis is said to… Read More »

Given two positive integers A and B such that A != B, the task is to find a positive integer X which maximizes the expression… Read More »

Given an array of red, blue and yellow objects, the task is to use an in-place sorting algorithm to sort the array in such a… Read More »

Given a bracket sequence as a string str, the task is to find whether the given string can be balanced by moving at most one… Read More »

A sequence of integers is said to be UpDown, if the inequality holds true. You are given a sequence . You can insert at most… Read More »

Given an array A[] of N integers such that A[0] + A[1] + A[2] + … A[N – 1] = 0. The task is to… Read More »

Given a tree with N vertices numbered from 0 to N – 1 (0th node is the root node). Also, given q queries containing nodes… Read More »

An Arrow operator in C/C++ allows to access elements in Structures and Unions. It is used with a pointer variable pointing to a structure or… Read More »

Given an array arr[] of N integers, the task is to sort the array in non-decreasing order by performing the minimum number of operations. In… Read More »

Given an array arr[] of N integers, the task is to find and print the Longest Increasing Subsequence. Examples: Input: arr[] = {12, 34, 1,… Read More »

Given a string str of lowercase characters, the task is to find the minimum number of characters that need to added to the string in… Read More »