## Two equal sum segment range queries

Given an array arr[] consisting of N positive integers, and some queries consisting of a range [L, R], the task is to find whether the… Read More »

- Find the longest string that can be made up of other strings from the array
- Minimum length substring with exactly K distinct characters
- Rearrange characters in a string such that no two adjacent are same using hashing
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Sum of nodes in bottom view of Binary Tree
- Count duplicates in a given linked list
- Sum of nodes in top view of binary tree
- Split the array elements into strictly increasing and decreasing sequence
- Find uncommon characters of the two strings | Set 2
- Design a stack which can give maximum frequency element
- Count equal pairs from given string arrays
- Minimum number of given operations required to convert a permutation into an identity permutation
- Remove all occurrences of any element for maximum array sum
- Count of pairs of strings which differ in exactly one position
- Minimum Bitwise XOR operations to make any two array elements equal
- Longest subsequence such that every element in the subsequence is formed by multiplying previous element with a prime
- Two equal sum segment range queries
- Count all elements in the array which appears at least K times after their first occurrence
- Count of pairs between two arrays such that the sums are distinct
- Minimum changes required to make a Catalan Sequence
- Partiton the string in two parts such that both parts have at least k different characters
- Minimum number of given operations required to reduce the array to 0 element
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array
- Find d to maximize the number of zeros in array c[] created as c[i] = d*a[i] + b[i]
- Maximum length of a sub-array with ugly numbers
- Print characters having odd frequencies in order of occurrence
- Rearrange given string to maximize the occurrence of string t
- Number of Positions to partition the string such that atleast m characters with same frequency are present in each substring
- Count number of pairs in array having sum divisible by K | SET 2
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range

Given an array arr[] consisting of N positive integers, and some queries consisting of a range [L, R], the task is to find whether the… Read More »

Given an array arr[] of N integer elements, the task is to change the minimum number of elements of this array such that it contains… Read More »

Given an array arr[], the task is to count unordered pairs of positive integers (p, q) such that p occurs in the array at least… Read More »

Given an unsorted sequence a[], the task is to find the K-th missing contiguous element in the increasing sequence of the array elements i.e. consider… Read More »

Given a character array arr[] containing only lowercase English alphabets, the task is to print the maximum length of the subarray such that the first… Read More »

Given an array of N numbers, the task is to find the number of sub-arrays (size of the sub-array should be an even number) of… Read More »

Given an array arr[] and an integer k, the task is to find the maximum product from the array such that the frequency sum of… Read More »

Given an array arr[] of N elements, the task is to find the length of the longest sub-sequence in arr[] such that all the elements… Read More »

Given a Binary Tree with distinct values, the task is to print the first smallest root to leaf path. We basically need to print the… Read More »

Given n sentences. The task is to count the number of words that appear in all of these sentences. Note that every word consists of… Read More »

Given an array arr[], the task is to print the count of unique pairs (arr[i], arr[j]) such that i < j. Examples: Input: arr[] =… Read More »

Given an array arr[] of N elements and an integer K, the task is to find the number of ways of choosing an integer X… Read More »

Given an integer N, the task is to find out whether it can be written as a sum of 2 triangular numbers (which may or… Read More »

Given two strings str1 and str2 where str1 being the parent string. The task is to find out the number of string as str2 that… Read More »

Given an array of N elements, the task is to find all the unique pairs that can be formed using the elements of a given… Read More »