Skip to content

# Category Archives: Divide and Conquer

Given two integers W and C, representing the number of watermelons and coins, the task is to find the maximum number of mangoes that can… Read More
Given a sorted array arr[] of size N and an integer K, the task is to find Kth smallest element present in the array. The… Read More
Given an array arr[] consisting of N integers, the task is to sort the given array in ascending order using the slow sort. Examples: Input:… Read More
Competitive Programming is vital for one’s development in the coding field. This article is going to discuss some basics points one should keep in mind… Read More
Given an array arr[] consisting of N integers, the task is to count the number of greater elements on the right side of each array… Read More
Given an array arr[] consisting of 2* N elements in the form of { a1, a2, …, aN, b1, b2, …, bN }, the task… Read More
Given a mountain array arr[] and an integer X, the task is to find the smallest index of X in the given array. If no… Read More
Given an array arr[] of size N, the task is to find the minimum count of array elements found by applying the Randomized Binary Search… Read More
Given two positive integers N and X, the task is to find the smallest divisor of N which is closest to X. Examples: Input: N… Read More
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and… Read More
Given an array arr[] consiting of N integers representing the number of coins in each pile, and an integer H, the task is to find… Read More
Given an array arr[] of length N and an integer K, the task is to count the number of pairs (i, j) such that i… Read More
Given an array arr[] of size N and an integer K, the task is to find all the array elements that appear more than (N… Read More
Given a positive integer N, the task is to construct an array a[] using first N natural numbers which contains no such triplet (i, j,… Read More
Given an array arr[] of size N (always power of 2), the task is to find the length of the longest sorted array to which… Read More