## Count of smaller elements on right side of each element in an Array using Merge sort

Given an array arr[] of N integers, the task is to count the number of smaller elements on the right side for each of the… Read More »

## Count the occurrence of Nth term in first N terms of Van Eck’s sequence

Prerequisite: Van Eck’s sequence Given a positive integer N, the task is to count the occurrences of Nth term in first N terms of Van… Read More »

## Length of Longest Subarray with same elements in atmost K increments

Given an integer array arr and a number K, the task is to find the length of longest subarray such that all the elements in… Read More »

## Minimum number of subsequences required to convert one string to another

Given two strings A and B consisting of only lowercase letters, the task is to find the minimum number of subsequences required from A to… Read More »

## Eggs dropping puzzle | Set 2

Given N eggs and K floors, the task is to find the minimum number of trials needed in the worst case to find the floor… Read More »

## Program to find X, Y and Z intercepts of a plane

In this article, it is explained how to find the X, Y and Z intercepts of a plane. There are two ways to find the… Read More »

## Length of Smallest subarray in range 1 to N with sum greater than a given value

Given two numbers N and S, the task is to find the length of smallest subarray in range (1, N) such that the sum of… Read More »

## Path with smallest product of edges with weight >= 1

Given a directed graph with N nodes and E edges where the weight of each of the edge is > 1, also given a source… Read More »

## Shortest path with exactly k edges in a directed and weighted graph | Set 2

Given a directed weighted graph and two vertices S and D in it, the task is to find the shortest path from S to D… Read More »

## Distribution of a Number in Array within a Range

Given integers S, N, K, L and R where S has to be distributed in an array of size N such that each element must… Read More »

## Next Number with distinct digits

Given an integer N, the task is to find the next number with distinct digits in it. Examples: Input: N = 20 Output: 21 The… Read More »

## Circular Convolution using Matrix Method

Given two array X[] and H[] of length N and M respectively, the task is to find the circular convolution of the given arrays using… Read More »

## Maximum length of Strictly Increasing Sub-array after removing at most one element

Given an array arr[], the task is to remove at most one element and calculate the maximum length of strictly increasing subarray. Examples: Input: arr[]… Read More »

## Minimum possible value of max(A, B) such that LCM(A, B) = C

Given an integer C, the task is to find the minimum possible value of max(A, B) such that LCM(A, B) = C. Examples: Input: C… Read More »

## Find two equal subsequences of maximum length with at least one different index

Given a string str, the task is to find the maximum length K such that there exist two sub-sequences A and B each of length… Read More »