## Count pairs in an array that hold i+j= arr[i]+arr[j]

Given an array of integers arr[], the task is to count all the pairs (arr[i], arr[j]) such that i + j = arr[i] + arr[j]… Read More »

- k-th missing element in an unsorted array
- Number of unique pairs in an array
- Count of words that are present in all the given sentences
- Find the longest string that can be made up of other strings from the array
- Minimum length substring with exactly K distinct characters
- Count occurrences of a string that can be constructed from another given string
- Sum of nodes in bottom view of Binary Tree
- Rearrange characters in a string such that no two adjacent are same using hashing
- Split the array elements into strictly increasing and decreasing sequence
- Sum of nodes in top view of binary tree
- Maximum length of the sub-array whose first and last elements are same
- Count duplicates in a given linked list
- Find uncommon characters of the two strings | Set 2
- Count of unique pairs (arr[i], arr[j]) such that i < j
- Remove all occurrences of any element for maximum array sum
- Minimum number of given operations required to convert a permutation into an identity permutation
- Number of subarrays such that XOR of one half is equal to the other
- Print the first shortest root to leaf path in a Binary Tree
- Design a stack which can give maximum frequency element
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Count of pairs of strings which differ in exactly one position
- Count equal pairs from given string arrays
- Two equal sum segment range queries
- Count all elements in the array which appears at least K times after their first occurrence
- Minimum changes required to make a Catalan Sequence
- Maximum product from array such that frequency sum of all repeating elements in product is less than or equal to 2 * k
- Find d to maximize the number of zeros in array c[] created as c[i] = d*a[i] + b[i]
- Count of pairs between two arrays such that the sums are distinct
- Longest subsequence such that every element in the subsequence is formed by multiplying previous element with a prime
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array

Given an array of integers arr[], the task is to count all the pairs (arr[i], arr[j]) such that i + j = arr[i] + arr[j]… Read More »

Given N integers with unknown values (ai > 0) having product P. The task is to find the maximum possible greatest common divisor of these… Read More »

Given an array arr[] of positive integers, the task is to count the maximum possible number of pairs (arr[i], arr[j]) such that arr[i] + arr[j]… Read More »

Given an array arr[], the task is to find the count of pairs from the array such that LCM(arr[i], arr[j]) > min(arr[i], arr[j]) Note: Pairs… Read More »

Given a string str and an array of strings strArr[], the task is to sort the array according to the alphabetical order defined by str.… Read More »

Given an array arr[] of N integers. The task is to find the sum of the elements which have frequencies greater than or equal to… Read More »

Given an array arr[] having 4 integer digits only. The task is to return the maximum 24 hour time that can be formed using the… Read More »

Given an array of N positive elements find the number of quadruple, (i, j, k, m) such that i < j < k < m… Read More »

Given an array of N integers. Each element in the array occurs same number of times except one element. The task is to find this… Read More »

Given an array containing N distinct elements. There are M queries, each containing an integer X and asking for the index of X in the… Read More »

Given an array where elements in small range. The maximum element in the array does not go beyond size of array. Find frequencies of elements.… Read More »

Given a string. The task is to find the maximum occurred substring with a maximum length. These occurrences can overlap. Examples: Input: str = “abab”… Read More »

Given an array arr, the task is to find the sum of the elements which have prime frequencies in the array. Note: 1 is neither… Read More »

Given a string str containing only lowercase English alphabets, the task is to find the sum and product of all the prime frequencies of the… Read More »

Given an array of N numbers, the task is to print all the numbers greater than 1 which divide the maximum of array elements. Examples:… Read More »