## Find element position in given monotonic sequence

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 »

- Binary Search a String
- Meta Binary Search | One-Sided Binary Search
- Number of subarrays have bitwise OR >= K
- Distribute N candies among K people
- Search element in a Spirally sorted Matrix
- Minimum in an array which is first decreasing then increasing
- Finding Floor and Ceil of a Sorted Array using C++ STL
- Program to find Nth term divisible by a or b
- Minimum K such that every substring of length atleast K contains a character c
- Search in a sorted 2D matrix (Stored in row major order)
- Find if array has an element whose value is half of array sum
- Find the maximum possible value of the minimum value of modified array
- Minimum number N such that total set bits of all numbers from 1 to N is at-least X
- Count numbers < = N whose difference with the count of primes upto them is > = K
- Number of anomalies in an array
- Count numbers in a range having GCD of powers of prime factors equal to 1
- Floor of every element in same array
- Find element position in given monotonic sequence
- Find minimum speed to finish all Jobs
- Count of Numbers such that difference between the number and sum of its digits not less than L
- Ceiling of every element in same array
- Count elements such that there are exactly X elements with values greater than or equal to X
- Lower Insertion Point

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 »

Binary Search is a technique used to search element in a sorted list. In this article, we will looking at library functions to do Binary… Read More »

Given N rods of different lengths. The task is to cut all the rods with some maximum integer height ‘h’ such that sum of cut-off… Read More »