Valid Word Abbreviation
Challenge Given two params a word and it’s abbreviation return True if the abbreviation is valid. Examples: "kubernetes" "k8s" => True "apple" "a2e" => False Solution This is the kind of implementation challenges easy to get wrong and/or forgot edge cases… class Solution: def validWordAbbreviation(self, word: str, abbr: str) -> bool: i = 0 tmp = "" if len(abbr) > 1 and abbr.isdecimal(): return False index = 0 while i < len(abbr): number = "" while i < len(abbr) and abbr[i]....