## Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )

Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array. Examples: Input : arr[][] = {{5,… Read More »

- How can one become good at Data structures and Algorithms easily?
- Find maximum in a stack in O(1) time and O(1) extra space
- Cracking Technical Interviews
- Print the nodes of binary tree as they become the leaf node
- Reach the numbers by making jumps of two given lengths
- Lower and Upper Bound Theory
- Shannon-Fano Algorithm for Data Compression
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Dijkstra's shortest path with minimum edges
- Sort the array of strings according to alphabetical order defined by another string
- Sum of similarities of string with all of its suffixes
- How to write a Pseudo Code?
- Check if it is possible to reach a number by making jumps of two given length
- Code Optimization Technique (logical AND and logical OR)
- Dividing a Large file into Separate Modules in C/C++, Java and Python
- Find the number in a range having maximum product of the digits
- Smallest power of 2 which is greater than or equal to sum of array elements
- Iterative Letter Combinations of a Phone Number
- Ternary Search
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Largest perfect square number in an Array
- Length of the longest alternating subarray
- Smallest Pair Sum in an array
- Number of array elements derivable from D after performing certain operations
- Count distinct substrings that contain some characters at most k times
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Jump Pointer Algorithm
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Find alphabet in a Matrix which has maximum number of stars around it
- Maximize the value of A by replacing some of its digits with digits of B

Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array. Examples: Input : arr[][] = {{5,… Read More »

Given an array arr[], the task is to find the maximum length of a subsequence such that the adjacent elements in the subsequence have a… Read More »

Given an array of N distinct integers, the task is to find the number of pairs (x, y) such that x < y. Example: Input:… Read More »

Given the values of m and c for the equation of a line y = (m * x) + c, the task is to find… Read More »

Given N numbers(N is an even number). Divide the N numbers into N/2 pairs in such a way that the sum of squares of the… Read More »

Given a number n, the task is to print all the numbers less than or equal to n which are perfect cubes as well as… Read More »

Given a string of ‘0’, ‘1’ and ‘2’. The task is to find the minimum number of replacements such that the adjacent characters are not… Read More »

Given an array of N including positive and negative numbers only. The task is to find the length of the longest alternating (means negative-positive-negative or… Read More »

Given a range [L, R], the task is to find all the numbers from the range which are composite as well as the eventual sum… Read More »

Given an array arr[] of N integers and an integer S. The task is to find an element K in the array such that if… Read More »

Given the value of ‘N’ and ‘I’. Here, represents the number of internal nodes present in an N-ary tree and every node of the N-ary… Read More »

There are N distinct integers arranged on a circle. The distance between any two adjacent numbers is 1. The task is to travel on this… Read More »

Given a complex number of the form x + yi and an integer n, the task is to calculate the value of this complex number… Read More »

Given an array of N integers. The task is to eliminate the minimum number of elements such that in the resulting array the sum of… Read More »

Given a number N, the task is to find the log value of the factorial of N i.e. log(N!). Note: ln means log with base… Read More »