Looking at the graph, this was one of the fastest java solutions so I'm posting it.

```
public class Solution {
public List<String> letterCombinations(String digits) {
List<String> result = new ArrayList<String>();
if (digits.length()==0) return result;
String[] l=new String[] { " "," ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
char[] c = digits.toCharArray();
int[] n = new int[c.length];
while(true) {
StringBuilder b=new StringBuilder();
for(int x=0;x<n.length;x++) {
b.append(l[c[x]-'0'].charAt(n[x]));
}
result.add(b.toString());
int p=0;
boolean carry=false;
n[0]+=1;
while (n[p]==l[c[p]-'0'].length() && p < c.length) {
n[p]=0;
p+=1;
if (p==c.length) return result;
n[p]+=1;
}
}
}
}
```