This category is for logical grouping only. It needn’t to be added directly. Instead, the sub-categories should be added.

## Queries to count integers in a range [L, R] such that their digit sum is prime and divisible by K

Given Q queries and an integer K where each query consists of a range [L, R] and the task is to find the count of… Read More »

## Check if the product of the K largest sums of subarrays is greater than M

Given an array arr[] of N integers and two integers M and K. The task is to check if the product of the K largest… Read More »

## Generate Binary Strings of length N using Branch and Bound

The task is to generate a binary string of length N using branch and bound technique Examples: Input: N = 3 Output: 000 001 010… Read More »

## Find count of pair of nodes at even distance

Given a connected acyclic graph with N nodes and N-1 edges, find out the pair of nodes that are at even distance from each other.… Read More »

## Find permutation array from the cumulative sum array

Given an array arr[] of N elements where each arr[i] is the cumulative sum of the subarray P[0…i] of another array P[] where P is… Read More »

## Sum of all the prime numbers with the count of digits ≤ D

Given an integer D, the task is to find the sum of all the prime numbers whose count of digits is less than or equal… Read More »

## Count set bits in the Kth number after segregating even and odd from N natural numbers

Given two integers N and K, the task is to find the count of set bits in the Kth number in the Odd-Even sequence made… Read More »

## Create a binary tree from post order traversal and leaf node array

Given 2 arrays, the first one containing postorder traversal sequence and the second one containing the information whether the corresponding node in the first array… Read More »

## Print completed tasks at end according to Dependencies

Given N dependencies of the form X Y, where X & Y represents two different tasks. The dependency X Y denotes dependency of the form… Read More »

## Find distance of nodes from root in a tree for multiple queries

Given a tree with N vertices numbered from 0 to N – 1 and Q queries containing nodes in the tree, the task is to… Read More »

## Find parent of each node in a tree for multiple queries

Given a tree with N vertices numbered from 0 to N – 1 and Q query containing nodes in the tree, the task is to… Read More »

## Check if two strings can be made equal by swapping one character among each other

Given two strings A and B of length N, the task is to check whether the two strings can be made equal by swapping any… Read More »

## Largest area square in an array when elements can be shuffled

Given an array arr[] of N integers where arr[i] is the height of the ith chocolate and all the chocolated are 1 unit wide, the… Read More »

## Convert given Matrix into sorted Spiral Matrix

Given a matrix, the task is to convert the given Matrix into sorted Spiral Matrix. Examples: Input: y[][] = { { 2, 5, 12 },… Read More »

## Form a Spiral Matrix from the given Array

Given an array, the task is to form a spiral matrix Examples: Input: arr[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,… Read More »