## Construct a string that has exactly K subsequences from given string

Given a string str and an integer K, the task is to find a string S such that it has exactly K subsequences of given… Read More »

- Minimize the maximum difference between adjacent elements in an array
- Number of pairs in an array with the sum greater than 0
- Minimum salary hike for each employee such that no employee feels unfair
- Extended Knapsack Problem
- Huffman Coding using Priority Queue
- Maximum profit by buying and selling a share at most K times | Greedy Approach
- Find lexicographically smallest string in at most one swaps
- Number of containers that can be filled in the given time
- Shortest path in a directed graph by Dijkstra’s algorithm
- Find the Mth element of the Array after K left rotations
- Why Prim’s and Kruskal's MST algorithm fails for Directed Graph?
- Sum of all subarrays of size K
- Count subarrays having sum of elements at even and odd positions equal
- Maximum size of square such that all submatrices of that size have sum less than K
- Longest increasing sub-sequence formed by concatenating array to itself N times
- Count the elements having frequency equals to its value
- Maximum Possible Rating of a Coding Contest
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Count of N digit Numbers whose sum of every K consecutive digits is equal
- Proof that traveling salesman problem is NP Hard
- Count number of triangles possible for the given sides range
- Lexicographical smallest number after at most K consecutive swaps
- Minimum cost to make an Array a permutation of first N natural numbers
- Construct an Array of Strings having Longest Common Prefix specified by the given Array
- Find the maximum sum (a+b) for a given input integer N satisfying the given condition
- C++ Program for the Fractional Knapsack Problem
- Maximum sum subarray of size range [L, R]
- Find the largest number smaller than integer N with maximum number of set bits
- Pair of integers with difference K having an element as the K-th multiple of the other
- Replace each element of Array with it's corresponding rank

Given a string str and an integer K, the task is to find a string S such that it has exactly K subsequences of given… Read More »

Given an array arr[] of N integers, the task is to replace each element of Array with their rank in array. The rank of an… Read More »

Given an integer N, the task is to calculate the sum of first N natural numbers adding all powers of 2 twice to the sum.Examples: … Read More »

Given an array arr[] of N positive integers and a positive integer M, the task is to find the length of longest subset whose smallest… Read More »

Given an arr[] of size N whose elements are sorted in descending order. The task is to find if the given array can be sorted… Read More »

Given an array arr[] of size N, the task is to rearrange the array elements such that for every index i(1 <= i <= N… Read More »

Given a string str, two characters X and Y. The task is to find the length of the longest substring that starts with X and… Read More »

Given a string S and an integer K, the task is to check if it is possible to distribute these characters into two strings such… Read More »

Given an integer K and an array A[ ] whose length is multiple of K, the task is to split the elements of the given… Read More »

Given two integers N and M, the task is to find the numbers of ways to form a matrix of size N * M consisting… Read More »

Given an array arr[] and a target value K. The task is to find the minimum number of steps required to take all elements from… Read More »

Given a binary array arr[], the task is to find the longest subarray of non-empty cells after the removal of at most 1 empty cell. … Read More »

Given two positive integers S and X which represents the sum and Bitwise XOR of all the elements of an array arr[]. The task is… Read More »

Given an array arr[] having N integers and an integer K, the task is to select K elements from the given array such that sum… Read More »

Given a string integer X consisting of N digits and an integer K, the task is to find the smallest integer greater than or equal… Read More »