# Category Archives: Searching

Given an array arr[] of size N and an integer K, the task is to find an array element which contains the digit K maximum… Read More
Given a 2D array arr[][] with each row of the form {l, r}, the task is to find a pair (i, j) such that the… Read More
Given an array arr[] of size N, the task is to find the total count of operations required to remove all the array elements such… Read More
Given an array arr[] of size N, the task is to check if the array is spirally sorted or not. If found to be true,… Read More
Given a set S of size N (1 ≤ N ≤ 1e5) consisting of intervals, the task is to find the minimum intervals required to… Read More
Given a Binary Tree, the task is to print the level order traversal of the tree after replacing the value of each node of the… Read More
Given a Binary tree consisting of N nodes with values in the range [1, N], the task is to find the distance from the root… Read More
Given three strings str, str1 and str2, the task is to count the number of pairs of occurrences of str1 and str2 as a substring… Read More
Given an array arr[] of size N and an integer K, the task is to find the maximum number of even numbers present in any… Read More
Given an array arr[] of size N, consisting of 0s initially, and a positive integer K, the task is to print the array elements by… Read More
Given an array arr[] of size N, the task is to count the pairs whose concatenation of elements is divisible by 3 and each array… Read More
Given a positive integer N and an integer D representing a digit, the task is to count the numbers in the range[1, N] such that… Read More
Given two arrays A[] and B[] of N unique elements, the task is to find the maximum number of matched elements from the two given… Read More
Given an array arr[] of size N and an integer K, the task is to find the length of the longest subarray consisting of same… Read More
Given a string str of length N, the task is to find the minimum number of substrings required to be removed to make all the… Read More