← ALL NOTES
Hash Table

17. Letter Combinations of a Phone Number

This is a Cartesian product of letter sets — digit 2 contributes one of {a,b,c}, digit 3 one of {d,e,f}, and you want every combination. The natural tool is backtracking: build a string character by…

Loading…