← ALL NOTES
Two Pointers

408. Valid Word Abbreviation

Check whether abbr is a valid abbreviation of word, where runs of letters may be replaced by their count — internationalization → i12iz4n. One pointer walks word while you parse abbr: a letter must…

Loading…