Skip to content

Category Archives: Divide and Conquer

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
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
Insertion sort: The array is virtually split into a sorted and an unsorted part. Values from the unsorted part are picked and placed at the… Read More
Inversion Count for an array indicates – how far (or close) the array is from being sorted. If the array is already sorted, then the… Read More
Inversion Count for an array indicates – how far (or close) the array is from being sorted. If the array is already sorted, then the… Read More
Order-Agnostic Binary Search is a modified version of Binary Search algorithm. Here in this modified binary search comes with one more condition checking. The intuition… Read More
Given two sorted arrays A[] and B[] consisting of N and M integers respectively, the task is to find the Kth smallest number in the… Read More
Given two numeric strings A and B, the task is to find the product of the two numeric strings efficiently. Example: Input: A = 5678,… Read More
Inversion Count for an array indicates – how far (or close) the array is from being sorted. If the array is already sorted, then the… Read More
Given a Generic Tree consisting of N nodes numbered from 0 to N – 1 which is rooted at node 0 and an array val[]… Read More

Start Your Coding Journey Now!