## Ceiling of every element in same array

Given an array of integers, find the closest smaller or same element for every element. If all elements are greater for an element, then print… Read More »

- Binary Search
- Search an element in a sorted and rotated array
- Longest Increasing Subsequence Size (N log N)
- Binary Search in C++ Standard Template Library (STL)
- Find the minimum element in a sorted and rotated array
- Find whether an array is subset of another array | Added Method 3
- The painter's partition problem
- Square root of an integer
- Find the Rotation Count in Rotated Sorted array
- The painter's partition problem | Set 2
- Median of two sorted arrays with different sizes in O(log(min(n, m)))
- Median of two sorted arrays of different sizes
- K-th Element of Two Sorted Arrays
- Find the element that appears once in a sorted array
- Place k elements such that minimum distance is maximized
- Exponential Search
- Longest Common Prefix using Binary Search
- Binary Search functions in C++ STL (binary_search, lower_bound and upper_bound)
- Binary Search in Java
- Find closest number in array
- The Ubiquitous Binary Search | Set 1
- Binary Search on Singly Linked List
- Find the smallest missing number
- Find median in row wise sorted matrix
- Find a pair with the given difference
- Arrays.binarySearch() in Java with examples | Set 1
- Linear Search vs Binary Search
- For each element in 1st array count elements less than or equal to it in 2nd array
- Find first and last positions of an element in a sorted array
- Binary Insertion Sort

Given an array of integers, find the closest smaller or same element for every element. If all elements are greater for an element, then print… Read More »

Given an integer k and a monotonic increasing sequence: f(n) = an + bn [log2(n)] + cn^3 where (a = 1, 2, 3, …), (b… Read More »

Given a sorted array (with unique entries), we have to find whether there exist an element(say X) which is exactly half the sum of all… Read More »

Given an array arr of N integers, the task is to find the number of elements that satisfy the following condition: If the element is… Read More »

Given an integer ‘K’ and a row-wise sorted 2-D Matrix i.e. the matrix has the following properties: Integers in each row are sorted from left… Read More »

Given two integers and . The task is to find the Nth term which is divisible by either of or . Examples : Input :… Read More »

Given an array A and an integer H where and . Each element A[i] represents remaining pending jobs to be done and H represents hours… Read More »

Given an array A of N integers. An anomaly is a number for which the absolute difference between it and every other number in the… Read More »

Meta binary search (also called one-sided binary search by Steven Skiena in The Algorithm Design Manual on page 134) is a modified form of binary… Read More »

Given an sorted array of positive numbers our tasks is to find the kth smallest sum of continuous subarray. Examples: Input : a[] = {1,… Read More »

Binary Search is searching technique which works on Divide and Conquer approach. It used to search any element in a sorted array. As compared to… Read More »

Given an array of N integers. The task is to find the maximum length subarray such that the sum of all its elements is greater… Read More »

Given N ranges and Q queries consisting of numbers. Every range consists of L and R. The task is to check if the given number… Read More »

Given an integer N, the task is to find the maximum product of A, B, C, D such that below conditions satisfy: N%A ==0 &&… Read More »