## Minimum index i such that all the elements from index i to given index are equal

Given an array arr[] of integers and an integer pos, the task is to find the minimum index i such that all the elements from… 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
- Operations required to make the string empty
- Find two numbers whose divisors are given in a random order
- Sum of the multiples of two numbers below N
- Number of subarrays have bitwise OR >= K
- Program to find the kth character after decrypting a string
- Remove characters from a numeric string such that string becomes divisible by 8
- Maximum length substring with highest frequency in a string
- Counting inversions in an array using segment tree

Given an array arr[] of integers and an integer pos, the task is to find the minimum index i such that all the elements from… Read More »

Given the source point and the destination point of the path and two integers x and y. The task is to check whether it is… Read More »

Given an array arr[], the task is to find the maximum length of a subsequence such that the adjacent elements in the subsequence have a… Read More »

Given N strings of equal lengths. The strings contain only digits (1 to 9). The task is to count the number of strings that have… Read More »

A useful application of Pascal’s triangle is the calculation of combinations. The formula to find nCr is n! / r! * (n – r)! which… Read More »

Given an integer N, the task is to count all possible N digit numbers such that A + reverse(A) = 10N – 1 where A… Read More »

Given an array arr[] and an integer k, we can cut this array at k different positions where k[] stores the positions of all the… Read More »

Given the position of a Bishop on an 8 * 8 chessboard, the task is to count the total number of squares that can be… Read More »

Given an array arr[] of integers, two players A and B are playing a game where A can remove any number of non-zero elements from… Read More »

Given two numbers and . Find the values of X and Y in the equations. A = X + Y B = X xor Y… Read More »

Given two numbers A and B ( A and B can be up to 106 ) which forms a number N = (A!/B!). The task… Read More »

Given a keypad of a mobile, and keys that need to be pressed, the task is to print all the words which are possible to… Read More »

Given N intervals of the form of [l, r], the task is to find the intersection of all the intervals. An intersection is an interval… Read More »

Given side of a square n and two points (x1, y1) and (x2, y2) on the boundaries of the given square. The task is to… Read More »

Given a string str containing lower case alphabets and character ‘?’. The task is to check if it is possible to make str good or… Read More »