The Wayback Machine - https://web.archive.org/web/20210419012617/https://www.geeksforgeeks.org/category/searching/
Skip to content

Category Archives: Searching

Given an array arr[] consisting of N strings, the task is to sort the array in ascending order after modifying each string by removing all… Read More
Given a string S consisting of N lowercase alphabets and an array of pairs of characters P[][2], the task is to modify the given string… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum value of (arr[i] + arr[j] + i − j) for… Read More
Given a positive integer N, the task is to find the smallest semi-prime number such that the difference between any of its two divisors is… Read More
Given a positive integer N, the task is to check if the given number N can be represented as the product of two positive perfect… Read More
Given two positive integers W and H and N rectangles of dimension W*H, the task is to find the smallest size of the square required… Read More
Given three strings S, S1, and S2, the task is to check if the number of substrings that start and end with S1 and S2… Read More
Given a positive integer N, the task is to count the number of integers from the range [1, N], that can be represented as ab,… Read More
Given an array arr[] consisting of N strings, the task is to find the maximum product of length of the strings arr[i] and arr[j] for… Read More
Given a Binary Tree consisting of N nodes, the task is to print the Level Order Traversal after replacing the value of each node with… Read More
Given three arrays a[], b[] and c[] of sizes A, B and C respectively, the task is to find the minimum possible value of abs(a[i]… Read More
Given a binary array arr[] of size N, the task is to find the total cost required to make all array elements equal to 1,… Read More
Given a matrix arr[][], consisting of only 0, 1, and 2, that represents an empty ward, an uninfected patient, and an infected patient respectively. In… Read More
Given a string S representing a sentence, the task is to reverse the order of all palindromic words present in the sentence. Examples: Input: S… Read More
Given two arrays A[] and B[], both consisting of a permutation of first N natural numbers, the task is to count the minimum number of… Read More