# Tag Archives: Constructive Algorithms

Given an array of N positive integers, the task is to find the smallest positive integer that can be placed between any two elements of… Read More
Given N numbers, find the number of permutations in which the sum of elements at odd index and sum of elements at even index are… Read More
Given N, print the sequence of a minimum number of steps in which N can be obtained starting from 0 using addition or subtraction of… Read More
Given a positive integer N whose unit’s digit is 3. Find the number of 1s in the smallest repunit which is divisible by the given… Read More
Given an array A[] that contains both positive and negative integers, find the maximum product subarray. Examples :  Input: A[] = { 6, -3, -10,… Read More
Given an array of N integers where Ai denotes the currency of note that the i-th person has. The possible currencies are 5, 10, and… Read More
Given an array of N integers, the task is to find the number of operations required to make all elements in the array equal. In… Read More
Given two strings S1 and S2(all characters are in lower-case). The task is to check if S2 can be formed from S1 using given constraints: 1.… Read More
Given N number of elements, find the minimum number of swaps required so that the maximum element is at the beginning and the minimum element… Read More
Given a number N which represents the total distance in km to be covered by a car on a single road. There are N petrol… Read More
Given two numbers X and d where X represents the number of non empty subsequences and d represents the difference. Output an array of size… Read More
Given an array A containing numbers from 2 to N.. A special type of sieving is done on it . The procedure of sieving is as… Read More