# Tag Archives: Constructive Algorithms

Given a positive integer N. The task is to find the maximum number that can be displayed on seven segment display using N segments.Seven Segmentâ€¦ Read More
Given two integers N and K, the task is to generate an array arr[] of length K such that: arr[0] + arr[1] + … +â€¦ Read More
Given two n * m matrices A[][] and B[][], the task is to make both the matrices strictly increasing (both rows and columns) only byâ€¦ Read More
Given an array arr[] of integers, the task is to arrange them in a way similar to the to-and-fro movement of a Pendulum without usingâ€¦ Read More
Given an array arr[] of integers, the task is to find the minimum number of operations required to change the array elements such that forâ€¦ Read More
Given a string str containing characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, the task is to determine if brackets are balanced or not. Bracketsâ€¦ Read More
Given two arrays A[] and B[] of equal sizes i.e. N containing integers from 1 to N. The task is to find sub-arrays from theâ€¦ Read More
Given a string str some of whose characters are missing and are represented by a ‘*’. The task is to substitute the missing characters soâ€¦ Read More
Given two arrays of N and M integers. The task is to find the number of unordered pairs formed of elements from both arrays inâ€¦ Read More
Given a string S, the task is to check if we can make the string lexicographically smaller by reversing any substring of the given string. â€¦ Read More
Given two array A[] and B[]. Where size of A[] represent the number of rows and A[i] represent the number of boxes in the ithâ€¦ Read More
There are two cash lockers, one has X number of coins and the other has Y number of coins, you can withdraw money at maxâ€¦ Read More
Given N intervals in the form [l, r] and an integer Q. The task is to find the interval which when removed results in theâ€¦ Read More
Given a circular ring which has marking from 1 to N. Given two numbers A and B, you can stand at any place(say X) andâ€¦ Read More
Given an integer N, the task is to find the value of F(N) if:   F(1) = 0 F(2) = 2 F(N) = 0, if Nâ€¦ Read More