## Minimum Increment to Make Array Unique Leetcode Solution

Problem Statement: Minimum Increment to Make Array Unique Leetcode Solution – You are given an integer array nums. In one move, you can pick an index i where 0 <= i < nums.length and increment nums[i] by 1. Return the minimum number of moves to make every value in nums unique. …

## Valid Palindrome II Leetcode Solution

Problem Statement The Valid Palindrome II LeetCode Solution – “Valid Palindrome II” states that given the string s, we need to return true if s can be a palindrome string after deleting at most one character. Example: Input: s = ”aba” Output: true Explanation: The input string is already palindrome, so there’s …

## Largest Number Leetcode Solution

Problem Statement The Largest Number LeetCode Solution – “Largest Number” states that given a list of non-negative integers nums, we need to arrange the numbers in such a way that they form the largest number and return it. Since the result may be very large, so you need to return …

## Split a String in Balanced Strings Leetcode Solution

Problem Statement In this problem, we are given a string of characters, containing only ‘R’ and ‘L’. We call a string balanced if it has the same number of ‘R’s and ‘L’s. We can split the given string into disjoint substrings. The goal is to find the maximum possible number …

## Minimum Swaps to Make Strings Equal Leetcode Solution

Problem Statement You are given two strings s1 and s2 of equal length consisting of letters “x” and “y” only. you can swap any two characters belong to different strings, your task is to make both the string equal. return minimum number of swaps required to make both strings equal …

## Check If a String Can Break Another String Leetcode Solution

Problem Statement In this problem we are given two strings s1 and s2 with the same size. Check if some permutation of string s1 can break some permutation of string s2 or vice-versa. In other words s2 can break s1 or vice-versa. A string x can break string y (both …

## Is Subsequence Leetcode Solution

Problem Statement In this problem, we are given two different strings. The goal is to find out whether the first string is a subsequence of the second. Examples first string = “abc” second string = “mnagbcd” true first string = “burger” second string = “dominos” false Approach(Recursive) This is easy …