## Find number of triplets in array such that a[i]>a[j]>a[k] and i<j<k

Given an array arr of size N. The task is to count number of triplets in the array such that a[i]>a[j]>a[k] and i<j<k Examples: Input… Read More »

- Print the longest prefix of the given string which is also the suffix of the same string
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Longest string in an array which matches with prefix of the given string
- Count of strings whose prefix match with the given string to a given length k
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Maximum number of given operations to remove the entire string
- Find a partition point in array to maximize its xor sum
- Find number of triplets in array such that a[i]>a[j]>a[k] and i<j<k
- Maximum length palindrome that can be created with characters in range L and R
- XOR in a range of a binary array
- Find an index such that difference between product of elements before and after it is minimum
- Count all prefixes of the given binary array which are divisible by x
- Longest prefix in a string with highest frequency
- Find the number of occurrences of a character upto preceding position
- Queries to answer the number of ones and zero to the left of given index
- Queries to print the character that occurs the maximum number of times in a given range
- Find the final radiations of each Radiated Stations
- Find the maximum length of the prefix

Given an array arr of size N. The task is to count number of triplets in the array such that a[i]>a[j]>a[k] and i<j<k Examples: Input… Read More »

Given a string S of size N and Q queries. Every query consists of L and R ( 0 < = L < = R… Read More »

Given a string str containing lowercase English characters, we can perform the following two operations on the given string: Remove the entire string. Remove a… Read More »

Given a binary array arr[] of size N and some queries. Each query represents an index range [l, r]. The task is to find the… Read More »

Given a string S of length N and an integer P(1≤P≤N) denoting the position of a character in the string. The task is to find… Read More »

Given an array a of size N. The task is to find an index ‘i’ (1 <= i <= N) such that (a[1] ^ …… Read More »

Given a string, find a prefix with the highest frequency. If two prefixes have the same frequency then consider the one with maximum length. Examples:… Read More »

Given an array of strings arr[] and Q queries where each each query consists of a string str, the task is to find the longest… Read More »

Given an array arr[] of N integers where all elements of the array are from the range [0, 9] i.e. a single digit, the task… Read More »

Given an integer arr[], the task is to find an index such that the difference between the product of elements up to that index and… Read More »

Given an array of strings arr[] and given some queries where each query consists of a string str and an integer k. The task is… Read More »

Given a string str and Q queries. Each query consists of two numbers L and R. The task is to find the maximum length palindrome… Read More »

There are N stations in a straight line, each of them has some non-negative radiation power. Every station can increase the radiation power of its… Read More »

Given a binary array and Q queries. Every query consists of a number K, the task is to print the number of ones and zeros… Read More »

Given a binary array arr[] and an integer x, the task is to count all the prefixes of the given array which are divisible by… Read More »