## Sort prime numbers of an array in descending order

Given an array of integers ‘arr’, the task is to sort all the prime numbers from the array in descending order in their relative positions… Read More »

## 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 »

## Maximize the sum of array by multiplying prefix of array with -1

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 »

## Numbers that are bitwise AND of at least one non-empty sub-array

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 »

## K- Fibonacci series

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 »

## Check whether the vowels in a string are in alphabetical order or not

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 »

## Sub-strings of length K containing same character

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 »

## Largest element in the array that is repeated exactly k times

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 »

## Remove even frequency characters from the string

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 »

## Count number of integers less than or equal to N which has exactly 9 divisors

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 »

## First triangular number whose number of divisors exceeds N

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 »

## Check if the characters of a given string are in alphabetical order

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 »

## Sum of nth terms of Modified Fibonacci series made by every pair of two arrays

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 »

## Number of Isosceles triangles in a binary tree

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 »

## Find Four points such that they form a square whose sides are parallel to x and y axes

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 »