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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
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 »
Given a matrix, the task is to convert the given Matrix into sorted Spiral Matrix. Examples: Input: y[][] = { { 2, 5, 12 },… Read More »
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 »