Click here to see the full article post
What is the definition of an "abbreviation" in this case? I don't understand how "1ord" or "w1rd" are abbrevations of "word", using this definition of "abbrevation" :
I am afraid the 2nd solution is limited to the range of int. It will overflow when input is too long.
I think I've managed to do this in proper O(2^n) time and space. I just store the abbreviations of lesser strings (strings, starting at startIdx).
Regarding backtracking's general algorithm description, I think it would be better if the author either 1) referenced Wikipedia's backtracking article (a lot easier to follow) rather than just cutting and pasting some portion of it without citing it, or 2) wrote it in his own words, using his own thoughts.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.