## Array range queries over range queries

Given an array of size n and a give set of commands of size m. The commands are enumerated from 1 to m. These commands… Read More »

- Sort an array without changing position of negative numbers
- Nth number whose sum of digit is multiple of 10
- Find maximum xor of k elements in an array
- What is Competitive Programming and How to Prepare for It?
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Maximize the happiness of the groups on the Trip
- Lexicographically Smallest Topological Ordering
- Find the number of pair of Ideal nodes in a given tree
- Find the minimum number of elements that should be removed to make an array good
- Sum of digits with even number of 1's in their binary representation
- Count of all possible values of X such that A % X = B
- Equal Sum and XOR of three Numbers
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Check whether a number can be represented as sum of K distinct positive integers
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Longest string in an array which matches with prefix of the given string
- Make the list non-decreasing by changing only one digit of the elements
- Generate elements of the array following given conditions
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Find the time which is palindromic and comes after the given time
- Find two vertices of an isosceles triangle in which there is rectangle with opposite corners (0, 0) and (X, Y)
- 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

Given an array of size n and a give set of commands of size m. The commands are enumerated from 1 to m. These commands… Read More »

The Google Foo bar challenge has been known for the last 5 years or more as a secret process of hiring developers and programmers all… Read More »

You are wondering some time coder write his code in 2 min or less how? No kidding! Although this tip may not be very useful… Read More »

Not using of 1LL or 1ll when needed filter_none edit close play_arrow link brightness_4 code // A program shows problem if we // don’t use… Read More »

In competitive programming or in general some problems seems difficult but can be solved very easily with little bit magic. We have discussed some tricks… Read More »

Although practice is the only way that ensures increased performance in programming contests but having some tricks up your sleeve ensures an upper edge and… Read More »

We have discussed some tricks in below post. In this post, some more tricks are discussed. Writing C/C++ code efficiently in Competitive programming Although practice… Read More »

Facebook hacker cup is an annual algorithmic programming contest organized by Facebook. Be it students, professionals or experts it attracts numerous programming enthusiasts from all… Read More »

Usually, main purpose of using map stl container is for efficient search operations and sorted order retrieval. As map stores key-value pair, all the search… Read More »

Prerequisites : Input/Output from external file in C/C++, Java and Python for Competitive Programming In above post, we saw a way to have standard input/output… Read More »

Given N modular equations: A ≅ x1mod(m1) . . A ≅ xnmod(mn) Find x in the equation A ≅ xmod(m1*m2*m3..*mn) where mi is prime, or… Read More »

Given an array arr[] of size n, its prefix sum array is another array prefixSum[] of same size such that the value of prefixSum[i] is… Read More »

While coding in various competitive sites, many people must have have encountered NZEC error. NZEC (non zero exit code) as the name suggests occurs when… Read More »

In most of the programming competitions, problems are required to answer the result in 10^9+7 modulo. The reason behind this is to have problems for… Read More »

Prerequisite : How to solve a Dynamic Programming Problem ? There are many types of problems that ask to count the number of integers ‘x‘… Read More »