# Category Archives: Searching

Given an array arr[] consisting of N integers whose absolute values are distinct and an integer K, the task is to find such an arrangement… Read More
Given an array arr[] of size N, the task is to find the maximum product from any subarray consisting of elements in strictly increasing or… Read More
Given an array arr[] of size N consisting of only 0s, 1s and 2s, the task is to find the count of triplets of indices… Read More
Given an array arr[] of size N, the task is to find the minimum count of elements required to be inserted into the array such… Read More
Given an integer N, the task is to print prime factors of N in decreasing order using the stack data structure. Examples: Input: N =… Read More
Given three integers N, A, and B, the task is to find a pair of positive integers (a, b) such that Aa + Bb =… Read More
Given a Binary Tree, the task is to find the most frequent subtree sum that can be obtained by considering every node of the given… Read More
Given an array arr[] of size N and an integer K, the task is to count the number of subarrays which consists of first K… Read More
Given a positive integer N, the task is to find the smallest integer greater than or equal to X, having all its digits divisible by… Read More
Given an array arr[] consisting of N positive integers and integers L and R, the task is to find the count of numbers in the… Read More
Given an integer N, the task is to find two integers with minimum possible sum such that their product is strictly greater than N. Examples:… Read More
Given an undirected graph G with vertices numbered in the range [0, N] and an array Edges[][] consisting of M edges, the task is to… Read More
Given a binary array arr[] of size N and a 2D array Q[][] containing K queries of the following two types: 1 : Print the… Read More
Given a matrix arr[][] of size N * M, the task is to print the matrix after removing all rows and columns from the matrix… Read More
Given a Binary Tree, the task is to find the smallest subtree that contains all the deepest nodes of the given Binary Tree and return… Read More