Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = “eceba”, k = 2 Output: 3 …
Given two strings s1 and s2, determine if s1 is a subsequence of s2. A string a is a subsequence of another string b if you can delete some …
Given a string s consisting only of 1s and 0s, you can delete any two adjacent letters if they are different. Return the length of the smallest string that …
Penny for Your Thoughts Given a positive integer n representing the amount of cents you have, return the formatted currency amount. For example, given n = 123456, return “1,234.56”. …
Given a string s, determine whether it has all unique characters. Example 1 Input s = “abcde” Output true Explanation All characters only occur once Example 2 Input s …