## Java 8 | Arrays parallelSort() method with Examples

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 »

- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Maximum element in a sorted and rotated array
- Interactive Problems in Competitive Programming
- Search element in a Spirally sorted Matrix
- Count the triplets such that A[i] < B[j] < C[k]
- Minimum steps to delete a string by deleting substring comprising of same characters
- Maximum Sum SubArray using Divide and Conquer | Set 2
- Lazy Propagation in Segment Tree | Set 2
- Sum of maximum of all subarrays | Divide and Conquer
- Find minimum steps required to reach the end of a matrix | Set - 1
- Generate a random permutation of elements from range [L, R] (Divide and Conquer)
- Find minimum steps required to reach the end of a matrix | Set 2
- IntroSort or Introspective sort
- Largest number N which can be reduced to 0 in K steps
- Kth smallest element in the array using constant space when array can't be modified
- Complexity Analysis of Binary Search
- Find 2^(2^A) % B
- Minimum operations of the given type required to make a complete graph
- Find the number of different numbers in the array after applying the given operation q times
- Find the value of XXXX.....(N times) % M where N is large
- Sum of i * countDigits(i)^2 for all i in range [L, R]
- Cost Based Tower of Hanoi
- Cartesian tree from inorder traversal | Segment Tree

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 »

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 »