You are given an array of integers and sum. You have to find out if there exist a pair of sum is equal to that sum or not. Print “Yes” if exist, Read more →
Searching
27 postsGiven a sorted array and a value x, we need to find floor and ceil value of x in the array using improved binary search technique. Floor value is the largest element Read more →
Given numbers from 1 to 10^10, we need to select that maximum number i from the range such that A*b(i)+C*i does not exceed m. A and C will be given and b(i) means Read more →
Find the minimum number ‘N’ such that the sum of ‘N’ natural numbers is greater than or equal to a given number ‘NUM’ using Binary Search. In this problem, we need to Read more →
In a prison, there are N cells. The positions of the cells are given in an array. The Jailer has to place all the prisoners in the cells in an ordered manner Read more →
Given an array arr[] of n positive integers and q queries, in which each query have an integer k. For each query, the task is to output the minimum size of subarray Read more →
In this tutorial, you will learn about linear search. Linear search is a very simple and basic search algorithm. It is basically a sequential search algorithm. We have to write a C Read more →