## Binary Search In JavaScript

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 »

- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Largest perfect square number in an Array
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Search element in a Spirally sorted Matrix
- Minimum in an array which is first decreasing then increasing
- Queries to check whether a given digit is present in the given Range
- 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)
- Generate a random permutation of elements from range [L, R] (Divide and Conquer)
- Range and Update Sum Queries with Factorial
- Minimum number N such that total set bits of all numbers from 1 to N is at-least X
- Minimum operations of the given type required to make a complete graph
- Find element position in given monotonic sequence
- Numbers that are bitwise AND of at least one non-empty sub-array

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 »

We are given a recursive function that describes Nth terms in form of other terms. In this article we have taken specific example. Now you… 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 »

Prerequisite :Merge Sort and Quick Sort Quick sort is an internal algorithm which is based on divide and conquer strategy. In this: The array of… Read More »

Given two numbers and . The task is to find the number of ways in which a can be represented by a set such that… Read More »

TL;DR In this article I’m trying to explain the difference/similarities between dynamic programing and divide and conquer approaches based on two examples: binary search and… 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 »

Given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in list. One of… Read More »

Given a sorted array and a target value, find the first element that is strictly smaller than given element. Examples: Input : arr[] = {1,… Read More »

Given a sorted array and a target value, find the first element that is strictly greater than given element. Examples: Input : arr[] = {1,… Read More »

Given three numbers a, b and c, we need to find (ab) % c Now why do “% c” after exponentiation, because ab will be… Read More »

Java 8 introduced a new method called as parallelSort() in java.util.Arrays Class. It uses Parallel Sorting of array elements Algorithm of parallelSort() 1. The array… Read More »

Given array of sorted integer, search key and search preferences find array position. A search preferences can be: 1) EQUAL – search only for equal… Read More »

We have discussed Merge sort. How to modify the algorithm so that merge works in O(1) extra space and algorithm still works in O(n Log… Read More »

Given an array A of N positive integers and a budget B. Your task is to decide the maximum number of elements to be picked… Read More »