Skip to content

Category Archives: Divide and Conquer

Given an ascending sorted array arr[] of size N and an integer K, the task is to partition the given array into K non-empty subarrays… Read More
Given an array queries[][] of Q range queries, the task is to find the minimum removals from the range[l, r] such that the bitwise AND… 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
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
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
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
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
Given an array, arr[] of length N, and an integer K. The value of the i-th element is arr[i]. The task is to find the… Read More
Given a number ‘n’ and our goal is to find out it is palindrome or not without using any extra space. We can’t make a new… Read More
Given an array of integers arr[] of size N, the task is to check whether arr[] can be split into different subarrays such that on… Read More
Given a binary string S of length N. The task is to find the following: The minimum number of subsequences, string S can be divided… Read More
Question: Write a function to find if a given integer x appears more than n/2 times in a sorted array of n integers. Basically, we need… Read More
Question: Write a function to find if a given integer x appears more than n/2 times in a sorted array of n integers. Basically, we need… Read More
Question: Write a function to find if a given integer x appears more than n/2 times in a sorted array of n integers. Basically, we need… Read More
Question: Write a function to find if a given integer x appears more than n/2 times in a sorted array of n integers. Basically, we need… Read More

Start Your Coding Journey Now!