## Sudo Placement | Range Queries

Given Q queries, with each query consisting of two integers L and R, the task is to find the total numbers between L and R… Read More »

- Quick Sort vs Merge Sort
- Find the Missing Number in a sorted array
- Modular exponentiation (Recursive)
- Largest perfect square number in an Array
- Dynamic Programming vs Divide-and-Conquer
- Binary Search In JavaScript
- Binary Search (bisect) in Python
- Kth Smallest sum of continuous subarrays of positive numbers
- Find Nth term (A matrix exponentiation example)
- 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)
- Java 8 | Arrays parallelSort() method with Examples
- Range and Update Sum Queries with Factorial
- Minimum operations of the given type required to make a complete graph
- Cut all the rods with some length such that the sum of cut-off length is maximized
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Minimum number N such that total set bits of all numbers from 1 to N is at-least X
- Search element in a Spirally sorted Matrix
- First strictly greater element in a sorted array in Java
- Numbers that are bitwise AND of at least one non-empty sub-array
- Find element position in given monotonic sequence
- First strictly smaller element in a sorted array in Java
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Generate a random permutation of elements from range [L, R] (Divide and Conquer)
- Number of ways to divide a given number as a set of integers in decreasing order
- Search equal, bigger or smaller in a sorted array in Java

Given Q queries, with each query consisting of two integers L and R, the task is to find the total numbers between L and R… Read More »

Given sum of digits and sum of square of digits . Find the smallest number with given sum of digits and sum of the square… Read More »

Master Theorem is used to determine running time of algorithms (divide and conquer algorithms) in terms of asymptotic notations. Consider a problem that be solved… Read More »

Given an array ‘a[]’ of size n and number of queries q. Each query can be represented by two integers l and r. Your task… Read More »

Given a singly linked list and a key, find key using binary search approach. To perform a Binary search based on Divide and Conquer Algorithm,… Read More »

As divide-and-conquer approach is already discussed, which include following steps: Divide the problem into a number of subproblems that are smaller instances of the same… Read More »

Binary search is a popular method of searching in a sorted array or list. It simply divides the list into two halves and discard the… Read More »

Given an integer n, we need to find the number of positive integers whose factorial ends with n zeros. Examples: Input : n = 1… Read More »

Given two polynomials, A(x) and B(x), find the product C(x) = A(x)*B(x). In the previous post we discussed the recursive approach to solve this problem… Read More »

Given two polynomial A(x) and B(x), find the product C(x) = A(x)*B(x). There is already an O() naive approach to solve this problem. here. This… Read More »

We have to paint n boards of length {A1, A2, .. An}. There are k painters available and each takes 1 unit time to paint… Read More »

Given an array of sorted integers. We need to find the closest value to the given number. Array may contain duplicate values and negative numbers.… Read More »

We have to paint n boards of length {A1, A2…An}. There are k painters available and each takes 1 unit time to paint 1 unit… Read More »

Given a tank with capacity C liters which is completely filled in starting. Everyday tank is filled with l liters of water and in the… Read More »

Given an array of 2n elements in the following format { a1, a2, a3, a4, ….., an, b1, b2, b3, b4, …., bn }. The… Read More »