# Category Archives: Searching

Given an n x n matrix and an integer x, find the position of x in the matrix if it is present. Otherwise, print “Elementâ€¦ Read More
Given a sorted array and a value x, the ceiling of x is the smallest element in an array greater than or equal to x,â€¦ Read More
Write an efficient program for printing K largest elements in an array. Elements in an array can be in any order Examples: Input:  [1, 23,â€¦ Read More
Given an array of size N. The task is to find the maximum and the minimum element of the array using the minimum number ofâ€¦ Read More
Write an efficient C++/C program to find the smallest and second smallest element in an array.  Example:  Input: arr[] = {12, 13, 1, 10, 34,â€¦ Read More
Question: An Array of integers is given, both +ve and -ve. You need to find the two elements such that their sum is closest toâ€¦ Read More
There are 2 sorted arrays A and B of size n each. Write an algorithm to find the median of the array obtained afterâ€¦ Read More
Given a sorted and rotated array arr[] of size N and a key, the task is to find the key in the array. Note: Findâ€¦ Read More
Given an array arr[] of size N-1 with integers in the range of [1, N], the task is to find the missing number from theâ€¦ Read More