# Tag Archives: Constructive Algorithms

Given an array arr[] of N distinct elements, the task is to check if it is possible to make the array increasing or decreasing by… Read More
Given an array arr[] of N distinct elements, the task is to check if it is possible to make the array increasing or decreasing by… Read More
Given an array arr[] of N distinct elements, the task is to check if it is possible to make the array increasing or decreasing by… Read More
Given a String S of length N, two integers B and C, the task is to traverse characters starting from the beginning, swapping a character… Read More
Given a String S of length N, two integers B and C, the task is to traverse characters starting from the beginning, swapping a character… Read More
Given a String S of length N, two integers B and C, the task is to traverse characters starting from the beginning, swapping a character… Read More
In C++, if a class has a constructor which can be called with a single argument, then this constructor becomes a conversion constructor because such… Read More
Given two strings S1 and S2 of length N and a positive integer K, the task is to find the lexicographically smallest string such that… Read More
Given an integer array arr[] of consisting of N integers, the task is check if it is possible to divide the given array into K… Read More
Given an array arr[] of N positive integers, the task is to find the count of indices i such that all the elements from arr… Read More
Given a binary array arr[] of size N. The task is to find the minimum number of inversions required so that no two adjacent elements… Read More
Given two strings A and B of length N, the task is to check whether the two strings can be made equal by swapping any… Read More
Given a number N, the task is to form N (from 0) by adding 1 or 2 in the minimum number of operations X such… Read More
Given a string str, the task is to make the string start and end at the same character with the minimum number of given operations.… Read More
Given an array arr[] of N integers with total element sum equal to zero. The task is to reduce every element to it’s half such… Read More