## Maximum sum of minimums of pairs in an array

Given an array arr[] of N integers where N is even, the task is to group the array elements in the pairs (X1, Y1), (X2,… Read More »

## Number of index pairs such that s[i] and s[j] are anagrams

Given an array s[] of N strings. The task is to find the number of pairs of indices (i, j) such that s[i] is an… Read More »

## Count of triplets in an array that satisfy the given conditions

Given an array arr[] of N elements, the task is to find the count of triplets (arr[i], arr[j], arr[k]) such that (arr[i] + arr[j] +… Read More »

## Find the number of positive integers less than or equal to N that have an odd number of digits

Given an integer N where 1 ≤ N ≤ 105, the task is to find the number of positive integers less than or equal to… Read More »

## Minimize sum by dividing all elements of a subarray by K

Given an array arr[] of N integers and a positive integer K, the task is to minimize the sum of the array elements after performing… Read More »

## Check if any K ranges overlap at any point

Given N ranges [L, R] and an integer K, the task is to check if there are any K ranges which overlap at any point.… Read More »

## Count of integers obtained by replacing ? in the given string that give remainder 5 when divided by 13

Given a string str of length N. The task is to find the number of integers obtained by replacing ‘?’ with any digit such that… Read More »

## Find Range Value of the Expression

Given two integers L and R, the task is to calculate the value of the expression:     Examples: Input: L = 6, R =… Read More »

## Length of the longest subsegment which is UpDown after inserting atmost one integer

A sequence of integers is said to be UpDown, if the inequality holds true. You are given a sequence . You can insert at most… Read More »

## Check if it is possible to make array increasing or decreasing by rotating the array

Given an array arr[] of N distinct elements, the task is to check if it is possible to make the array increasing or decreasing by… Read More »

## Count number of rotated strings which have more number of vowels in the first half than second half

Given a string str of even size N consisting of lowercase English alphabets. The task is to find the number of rotated strings of str… Read More »

## Maximum height of the binary search tree created from the given array

Given an array arr[] of N integers, the task is to make two binary search trees. One while traversing from the left side of the… Read More »

## Count of N-digit Palindrome numbers

Given an integer N, the task is to find the count of N-digit Palindrome numbers. Examples: Input: N = 1 Output: 9 {1, 2, 3,… Read More »

## Maximum LCM among all pairs (i, j) of first N natural numbers

Given a positive integer N > 1, the task is to find the maximum LCM among all the pairs (i, j) such that i <… Read More »

## Minimum numbers with one’s place as 9 to be added to get N

Given an integer N, the task is to find the minimum count of numbers which needs to be added to get N. (All such numbers… Read More »