Skip to content

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

Start Your Coding Journey Now!