Given a positive integer N, the task is to find the count of all the numbers M such that when the number N is divided… Read More

# Category Archives: Searching

Given an array arr[] of size N, the task is to find the smallest indexed array element whose sign needs to be flipped such that… Read More

Given an array arr[] consisting of N integers and an integer K, the task is to count the number of array elements having exactly K… Read More

Given a Binary Tree consisting of N nodes, the task to find the maximum average of values of nodes of any subtree. Examples: Input: … Read More

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

Queries to find the length of the longest prefix from given array having all elements divisible by K

Given an array arr[] consisting of N elements and an arrayQ[], the task for each query is to find the length of the longest prefix… Read More

Given a string S of length N, the task is to check if a string can be split into two substrings, say A and B… Read More

Given two strings S and T of length N and M respectively, the task is to check if the string S can be converted to… Read More

Given an array arr[] consiting of N integers representing the number of coins in each pile, and an integer H, the task is to find… Read More

Given two arrays L[] and R[] of sizes Q, the task is to find the number of composite magic numbers i.e numbers which are both… Read More

Given an array arr[] of size N and a positive integer K, the task is to find the smallest positive integer such that the sum… Read More

Given a numeric string S representing a positive decimal integer, the task is to find the minimum number of positive Deci-Binary numbers required to obtain… Read More