# Tag Archives: Constructive Algorithms

Given a number N in the form of string. The task is to find the greatest number that has same set of digits as Nâ€¦ Read More
Given a matrix of distinct elements. The task is to sort the rows of matrix in descending order followed by sorting the columns in ascendingâ€¦ Read More
Given two integers N and K, the task is to generate a permutation of N numbers (Every number from 1 to N occurs exactly once)â€¦ Read More
Given two integers N and M, partition N into M integers such that the difference between the maximum and minimum integer obtained by the partitionâ€¦ Read More
Given a number . The task is to check if the number is formed by concatenating the numbers 1, 14 and 144 only any number ofâ€¦ Read More
Given a binary array( consider it as cyclic with start and end tied together) of length N having only one’s and zero’s where . The taskâ€¦ Read More
Given an integer and two integer arrays H[] and C[] of size where H[] stores the height of consecutive buildings and C[] stores the color codes forâ€¦ Read More
Given two arrays div and rem which hold the values for divisors and remainders, the task is to find the number which after being successivelyâ€¦ Read More
Given a square matrix of odd order N. The task is to find the side-length of the largest square formed in the matrix. A squareâ€¦ Read More
Given a string str. The task is to count the minimum number of elements to be removed so that pairwise consecutive elements are same Examples: â€¦ Read More
Given M x N Chessboard. The task is to determine the Maximum numbers of cuts that we can make in the Chessboard such that theâ€¦ Read More
CamelCase is the sequence of one or more than one words having the following properties:  It is a concatenation of one or more words consistingâ€¦ Read More
Given the total number of Legs and Head of Rabbits and Pigeons. The task is to calculate the number of Rabbits and Pigeons. Examples:  Input:â€¦ Read More
Given an integer element ‘N’, the task is to find the minimum number of operations that need to be performed to make ‘N’ equal toâ€¦ Read More
Given an array with N distinct elements. The task is to find the minimum number of elements to be changed in the array such that,â€¦ Read More