## Trick for modular division ( (x1 * x2 …. xn) / b ) mod (m)

Given integers x1, x2, x3……xn, b and m, we are supposed to find the result of ((x1*x2….xn)/b)mod(m). Example 1 : Suppose that we are required… Read More »

- Practice for cracking any coding interview
- How to get rid of Java TLE problem
- How can one become good at Data structures and Algorithms easily?
- Burst Balloon to maximize coins
- Understanding The Coin Change Problem With Dynamic Programming
- Subset array sum by generating all the subsets
- Reach the numbers by making jumps of two given lengths
- Make all numbers of an array equal
- Sum of similarities of string with all of its suffixes
- Some useful C++ tricks for beginners in Competitive Programming
- Maximize the total profit of all the persons
- Find triplets in an array whose AND is maximum
- Check if a number is perfect square without finding square root
- Length of the longest Subarray with only Even Elements
- Sort the array of strings according to alphabetical order defined by another string
- Python in Competitive Programming
- Print matrix in snake pattern from the last column
- Sum of the first N Prime numbers
- How to read Competitive Programming Questions?
- How can competitive programming help you get a job?
- Check if it is possible to reach a number by making jumps of two given length
- C++: Methods of code shortening in competitive programming
- Minimum changes required to make two arrays identical
- Number of array elements derivable from D after performing certain operations
- Sum of the multiples of two numbers below N
- Number of quadrilaterals possible from the given points
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Minimum number of increasing subsequences
- Find two numbers whose divisors are given in a random order
- Minimum number of sets with numbers less than Y

Given integers x1, x2, x3……xn, b and m, we are supposed to find the result of ((x1*x2….xn)/b)mod(m). Example 1 : Suppose that we are required… Read More »

Find the number of digits in the nth number constructed by using 6, 1, 4 and 9 as the only digits in the ascending order.… Read More »

Given an array of n positive integers, write a program to find the maximum sum of increasing subsequence from prefix till i-th index and also… Read More »

Prerequisite :Basic knowledge of STL and Sets Data structure. About ordered set Ordered set is a policy based data structure in g++ that keeps the… Read More »

Given a string s we have to find the length of the longest substring of s which contain exactly K distinct vowels. Note: Consider uppercase… Read More »

Given two arrays of same size, we need to convert the first array into another with minimum operations. In an operation, we can either increment… Read More »

Given an array of even number of elements, form groups of 2 using these array elements such that the difference between the group with highest… Read More »

Given an array and a value k. We have to find the maximum number of equal elements possible for the array so that we can… Read More »

Vantieghems Theorem is a necessary and sufficient condition for a number to be prime. It states that for a natural number n to be prime,… Read More »

Given a set of N elements such that N, task is to generate an array such that the GCD of any subset of the generated… Read More »

Given a rectangular matrix M[0…n-1][0…m-1], and queries are asked to find the sum / minimum / maximum on some sub-rectangles M[a…b][e…f], as well as queries… Read More »

An ordered tree is an oriented tree in which the children of a node are somehow ordered. It is a rooted tree in which an… Read More »

The sequence first consists of all the odd numbers starting from 1 to n and then remaining even numbers starting 2 up to n. Let’s… Read More »

Given a text and a wildcard pattern, find if wildcard pattern is matched with text. The matching should cover the entire text (not partial text).… Read More »