Skip to content

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

Start Your Coding Journey Now!