#string
Read more stories on Hashnode
Articles with this tag
class Solution: def canMakeSubsequence(self, str1: str, str2: str) -> bool: if len(str2) > len(str1): return False ...
class Solution: def getLucky(self, s: str, k: int) -> int: EXTRA = 96 letters = [] def convert(val): nonlocal...
class Solution: def replaceWords(self, dictionary: List[str], sentence: str) -> str: roots = set(dictionary) ans = "" ...
class Solution: def commonChars(self, words: List[str]) -> List[str]: d = defaultdict(int) for e in words[0]: d[e] +=...
class Solution: def longestPalindrome(self, s: str) -> int: d = defaultdict(int) x = set() ans = 0 for e...
class Solution: def reverseString(self, s: List[str]) -> None: # Time : o(n) | Space : o(1) # return s.reverse() ...