Skip to content

Tag Archives: Constructive Algorithms

Given a string str in camelCase format, the task is to convert the string into a readable form.Examples:   Input: str = “ILoveGeeksForGeeks” Output: I love geeks… Read More
Given two binary strings str1 and str2, the task is to check whether it is possible to convert str1 to str2 by combining two consecutive… Read More
Given two integers A and B. The task is to check whether it is possible to convert A into B by performing below operations any… Read More
Given an integer N and the task is to find a sequence of N prime numbers whose sum is a composite number.Examples:   Input: N =… Read More
Given an array of strings of length N, it is allowed to concatenate them in any order. Find the maximum possible number of occurrences of… Read More
Given a array ‘a[]’ of size n and number of queries q. Each query can be represented by a integer m. Your task is to… Read More
Given an array Row[] of size R where Row[i] is the sum of elements of the ith row and another array Column[] of size C… Read More
Given an integer N, the task is to find the MDAS factorial.The general factorial of a no. N is given by:   Factorial(N) = (N)*(N-1)*(N-2)*(N-3)*(N-4)*(N-5)*(N-6)*(N-7)- –… Read More
Given an array arr[] of N integers, the task is to find the longest sub-sequence in the given array such that for all pairs from… Read More
Given an array arr[], the task is to find the maximum distance between two unequal elements of the given array.Examples:   Input: arr[] = {3, 2,… Read More
Given an integer array that represents the heights of N buildings. The task is to delete N – 2 buildings such that the water that… Read More
Given an integer array arr[], and some queries consisting of an integer K, the task is to determine if its possible to make all the… Read More
Given a balanced bracket sequence as a string str containing character ‘(‘ or ‘)’, the task is to find the next lexicographical order balanced sequence… Read More
Given a positive integer N, the task is to find out all the combinations of positive integers that add upto the given integer N. The… Read More

Start Your Coding Journey Now!