# Category Archives: Divide and Conquer

Given a sorted array arr[] of N integers and an integer K, the task is to split the array into K subarrays such that the… Read More
Given a sorted array arr[], and a set Q having M queries, where each query has values X and Y, the task is to find… Read More
Given an array arr[] of N integers, the task is to delete the element from the given array if element to it’s left is smaller… Read More
Given two strings S1 and S2 of equal length, the task is to determine if S2 is a scrambled form of S1.Scrambled string: Given string str,… Read More
Given a number N, the task is to find the minimum value K such that the sum of cubes of the first K natural number… Read More
In the number guessing game, the user selects a number within a defined range and then the program guesses the number. If the number guessed… Read More
Check if a given number N is a perfect square or not. If yes then return the number of which it is a perfect square,… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  query(start, end): Print the number of Armstrong numbers in… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  maximum(start, end): Print the maximum Armstrong number of elements… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  query(start, end): Print the number of perfect square numbers… Read More
Given an array arr[] of N integers and Q queries, each query having two integers L and R, the task is to find the element… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  query(L, R): Print the number of Even Parity numbers… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  maximum(start, end): Print the maximum Fibonacci number of elements… Read More
Given a binary matrix M where each element of the matrix will be 0 or 1, the task is to find the largest square that… Read More
Given an array of positive integers and a value K, The task is to empty the array in less than or equal to K small… Read More