## Arrange a binary string to get maximum value within a range of indices

Given a string consisting of only 0’s and 1’s. Now you are given N non-intersecting ranges L, R ( L <= R), more specifically [L1,… Read More »

- How can one become good at Data structures and Algorithms easily?
- Understanding The Coin Change Problem With Dynamic Programming
- Subset array sum by generating all the subsets
- Make all numbers of an array equal
- 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
- Minimum number of sets with numbers less than Y
- Count the number of vowels occurring in all the substrings of given string
- 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
- Remove characters from a numeric string such that string becomes divisible by 8
- Program to find the kth character after decrypting a string
- Maximum length substring with highest frequency in a string

Given a string consisting of only 0’s and 1’s. Now you are given N non-intersecting ranges L, R ( L <= R), more specifically [L1,… Read More »

Given an array of elements ‘arr’, the task is to maximise the sum of the elements of this array after performing the following operation: You… Read More »

Given an array ‘arr’, the task is to find all possible integers each of which is the bitwise AND of at least one non-empty sub-array… Read More »

Given integers ‘K’ and ‘N’, the task is to find the Nth term of the K-Fibonacci series. In K – Fibonacci series, the first ‘K’… Read More »

Given a string ‘str’, the task is to find whether the vowels in the string are in alphabetical order or not. The string contains only… Read More »

Given a string ‘str’ and an integer ‘k’, the task is to count the number of sub-strings of length ‘k’ which are comprised of the… Read More »

Given an array of integers and an integer ‘k’, the task is to find the largest element from the array that is repeated exactly ‘k’… Read More »

Given a string ‘str’, the task is to remove all the characters from the string that have even frequencies. Examples: Input: str = “aabbbddeeecc” Output:… Read More »

Given a number N(1<=N<=109), the task is to find the total number of integers less than equal to n which have exactly 9 divisors. Examples:… Read More »

Given a number N, find the first triangular number whose number of divisors exceeds N. Triangular numbers are sums of natural numbers, i. e., of… Read More »

Given a string ‘s’, the task is to find if the characters of the string are in alphabetical order. The string contains only lowercase characters.… Read More »

Given two arrays A and B of same size m. You have to find the sum of nth terms of Fibonacci like series (value of… Read More »

Pre-Requisites: Depth First Search | Parent Array Representation Given a parent array representation of a binary tree, we need to find the number of Isosceles… Read More »

Given ‘n’ pair of points, the task is to find four points such that they form a square whose sides are parallel to x and… Read More »

Given an integer ‘sum’ (less than 10^8), the task is to find a pair of prime numbers whose sum is equal to the given ‘sum’… Read More »