# Category Archives: Searching

Given two snapshots S1 and S2 of N elements, the task is to find the elements which are changing their groups and the ones that… Read More
A bike race is being organised with N bikers. The initial speed and the acceleration of the bikers are given in arrays H[] and A[]… Read More
There are many ways for checking whether the array contains any specific value or not, one of them is: Examples: Input: arr[] = {10, 30,… Read More
Given a 2-dimensional integer array arr[] representing N ranges, each of type [starti, endi] (starti, endi ≤ 109) and Q queries represented in array query[],… Read More
Given a string s of length N, containing digits written in words but in jumbled form, the task is to find out the digits present… Read More
Given a stack of M elements and a queue of N elements in sorted order. The task is to find out the common elements of… Read More
Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored. Mainly the widely used… Read More
Given a binary tree, a target node and a positive integer K on it,  the task is to find the sum of all nodes within… Read More
Given an array A[] containing N elements of an array and their frequency in that array (say arr[]), the task is to find the median… Read More
Given an array arr[] of size N representing the time taken by a person to complete a task. Also, an array restTime[] which denotes the… Read More
Given an array arr[] of size N and an integer K, the task is to minimize the value of the maximum element of the array… Read More
Given an array A[] having N non-negative integers, find a pair of indices i and j such that the absolute difference between them is same… Read More
Given an array, arr[] of size N and a positive integer D, the task is to find the position i of an element in arr[]… Read More
Given a string str and K pair of characters, the task is to check if string str can be made Palindrome, by replacing one character… Read More
Given a sorted array arr[] of size N, where arr[i] denotes the starting position of a sequence, the task is to find the minimum number… Read More