## Find the original matrix when largest element in a row and a column are given

Given two arrays A[] and B[] of N and M integers respectively. Also given is a N X M binary matrix where 1 indicates that… Read More »

- How can one become good at Data structures and Algorithms easily?
- Make all numbers of an array equal
- Subset array sum by generating all the subsets
- Reach the numbers by making jumps of two given lengths
- Some useful C++ tricks for beginners in Competitive Programming
- Check if a number is perfect square without finding square root
- Sum of XOR of all subarrays
- Sum of the first N Prime numbers
- Sort the array of strings according to alphabetical order defined by another string
- Sum of similarities of string with all of its suffixes
- Length of the longest Subarray with only Even Elements
- Check if it is possible to reach a number by making jumps of two given length
- Find the number in a range having maximum product of the digits
- Make Binary Search Tree
- Print matrix in snake pattern from the last column
- Maximum of all Subarrays of size k using set in C++ STL
- Smallest Pair Sum in an array
- Number of array elements derivable from D after performing certain operations
- Count distinct substrings that contain some characters at most k times
- Count the number of vowels occurring in all the substrings of given string
- Minimum number of sets with numbers less than Y
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Find two numbers whose divisors are given in a random order
- Operations required to make the string empty
- Sum of the multiples of two numbers below N
- Program to find the kth character after decrypting a string
- Number of subarrays have bitwise OR >= K
- Remove characters from a numeric string such that string becomes divisible by 8
- Counting inversions in an array using segment tree
- Maximum length substring with highest frequency in a string

Given two arrays A[] and B[] of N and M integers respectively. Also given is a N X M binary matrix where 1 indicates that… Read More »

Given an array arr[] of N positive integers. The task is to find the maximum possible value of a[i] % a[j] over all pairs of… Read More »

Given an integer N. The task is to find the number of divisors of all the numbers in the range [1, N]. Examples: Input: N… Read More »

Given an array arr[] containing the permutation of first N natural numbers and an integer M ≤ N. The task is to find the number… Read More »

Given an array of N integers. The task is to find the maximum difference between the index of any two different numbers. Note that there… Read More »

Interactive Problems are those problems in which our solution or code interacts with the judge in real time. When we develop a solution for an… Read More »

Given an array arr[] of size N. The task is to make all the array elements equal by applying the below operations minimum number of… Read More »

Given an undirected graph with N vertices and M edges and no self loops or multiple edges. The task is to convert the given undirected… Read More »

Given an array arr[] of size N. There are two types of operations: Update(l, r, x) : Increment the a[i] (l <= i <= r)… Read More »

Given three integers N, X and Y. The task is to find N positive integers that satisfy the given equations. a12 + a22 + ….… Read More »

Given a very large number N. The task is to find (1n + 2n + 3n + 4n) mod 5. Examples: Input: N = 4… Read More »

Given a permutation P (P1, P2, P3, … Pn) of first n natural numbers. Find the minimum number of operations to convert it into an… Read More »

Given an array arr[] containing GCD of every possible pair of elements of another array. The task is to find the original numbers which are… Read More »

Given a mat[][] of size n X n, the task is to find an element X such that if the anti-clockwise traversal is begun from… Read More »

Given an array arr[] of size n where arr[i] is the amount of candies of type i. You have unlimited amount of money. The task… Read More »