## Find the lexicographical next balanced bracket sequence

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 »

- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Optimal File Merge Patterns
- Find Intersection of all Intervals
- Given count of digits 1, 2, 3, 4, find the maximum sum possible
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Maximum number of candies that can be bought
- Minimum number of pairs required to make two strings same
- Greedy approach vs Dynamic programming
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Minimum elements to be removed such that sum of adjacent elements is always odd
- Minimum operations to make frequency of all characters equal K
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Maximum distance between two unequal elements
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Count common elements in two arrays containing multiples of N and M
- Count all possible N digit numbers that satisfy the given condition
- Find the minimum number of steps to reach M from N
- Find smallest number K such that K % p = 0 and q % K = 0
- Maximal Disjoint Intervals
- Divide a number into two parts
- Count possible moves in the given direction in a grid
- Find the sum of digits of a number at even and odd places
- Find n positive integers that satisfy the given equations
- Minimum LCM and GCD possible among all possible sub-arrays
- Create a Sorted Array Using Binary Search
- Find the Kth smallest element in the sorted generated array
- Count the pairs of vowels in the given string
- Minimum deletions required to make GCD of the array equal to 1
- Find minimum length sub-array which has given sub-sequence in it
- Minimum deletions required such that any number X will occur exactly X times

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 an array arr[] of N integers and an integer X, the task is to find the maximum possible sub-array sum after applying at most… Read More »

A Greedy algorithm is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious… Read More »

Given two strings s1 and s2 of same length, the task is to count the minimum number of pairs of characters (c1, c2) such that… Read More »

Given an array arr[] of N distinct integers, the task is to find the maximum elements in an interval [L, R] such that the interval… Read More »

Given an array arr[] of N positive integers and a non negative integer K. The task is to delete exactly K sub-arrays from the array… 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 a positive integer N. The task is to find the maximum number that can be displayed on seven segment display using N segments. Seven… 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 N integers. The task is to find the minimum number of given operations required to reduce the array to 0… Read More »

Given a set of digits S and an integer N, the task is to find the smallest positive integer if exists which contains only the… Read More »

Given an array arr[] of size N, the task is to count the number of ways we can select a subset from the given array… Read More »

Given a large number of N digits. We are also given with 10 numbers which represents the alternate number for all the one-digit numbers from… Read More »

Given an array arr[] of N integer elements, the task is to choose an element X and apply XOR operation on every element of the… Read More »