# 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
The task at hand involves manipulating a string S of length N, given as input. The string is subjected to a series of B swaps,â€¦ 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[0]â€¦ 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