## Smallest Greater (than S) String of length K whose letters are subset of S

Given a string S of length N consisting of lowercase English letters and an integer K. Find the lexicographically smallest string T of length K,… Read More »

- Practice for cracking any coding interview
- How to get rid of Java TLE problem
- How can one become good at Data structures and Algorithms easily?
- Burst Balloon to maximize coins
- Understanding The Coin Change Problem With Dynamic Programming
- Subset array sum by generating all the subsets
- Reach the numbers by making jumps of two given lengths
- Sum of similarities of string with all of its suffixes
- Make all numbers of an array equal
- Some useful C++ tricks for beginners in Competitive Programming
- Maximize the total profit of all the persons
- Find triplets in an array whose AND is maximum
- Check if a number is perfect square without finding square root
- Length of the longest Subarray with only Even Elements
- Sort the array of strings according to alphabetical order defined by another string
- Python in Competitive Programming
- Print matrix in snake pattern from the last column
- Sum of the first N Prime numbers
- How can competitive programming help you get a job?
- How to read Competitive Programming Questions?
- Check if it is possible to reach a number by making jumps of two given length
- Minimum changes required to make two arrays identical
- Number of array elements derivable from D after performing certain operations
- C++: Methods of code shortening in competitive programming
- Sum of the multiples of two numbers below N
- Number of quadrilaterals possible from the given points
- Minimum number of increasing subsequences
- Find two numbers whose divisors are given in a random order
- Minimum number of sets with numbers less than Y
- Smallest Pair Sum in an array

Given a string S of length N consisting of lowercase English letters and an integer K. Find the lexicographically smallest string T of length K,… Read More »

Given some weights of masses a0, a1, a2, …, a100, a being an integer, and a weighing scale where weights can be put on both… Read More »

Given a K-ary tree, where each node is having K children and each edge has some weight. All the edges i.e. K, that goes from… Read More »

Given X and Y coordinates of N points on a Cartesian plane. The task is to find the number of possible triangles with the non-zero… Read More »

Given three integers A, B and X. The task is to construct a binary string str which has exactly A number of 0’s and B… Read More »

Given an array of distinct integers arr[], the task is to find a pair which has the minimum sum and print the sum. Examples: Input:… Read More »

Given a string str, the task is to check whether every group of consecutive a’s is followed by a group of consecutive b’s of same… Read More »

Given a string str, the task is to find the sum of the similarities of str with each of its suffixes. The similarity of strings… Read More »

Give an array of positive integers. The task is to find the total sum after performing the bit wise OR operation on all the sub… Read More »

Given two integers A and B where A is not divisible by B, the task is to express A / B as a natural number… Read More »

Given a Binary String of length . It is allowed to do at most one swap between any 0 and 1. The task is to… Read More »

Given an array arr, the task is to print the elements of the array in descending order along with their frequencies. Examples: Input: arr[] =… Read More »

Given an integer N, the task is to find the sum of N and it’s maximum prime factor. Examples: Input: 19 Output: 38 Maximum prime… Read More »

Given an integer N, the task is to find the greatest number less than N such that the sum of its digits is greater than… Read More »

Given two positive integers L and R, the task is to count the elements from the range [L, R] whose prime factors are only 2… Read More »