Use recursion to walk through the combination space. I use an array of codes, which maps the index to the letter combinations for that index. In the recursive function we loop through all the possible letters for the current number and then recurse into the next digit. I use backtracking to save on creating a whole new combination string for each recursive call.
-
Recent Posts
Recent Comments
Archives
Categories
Meta