Solution 1: accepted 7ms
Increment and simply mapping the index.
|
|
Solution 2: accepted 5ms
This solution will use more space but has better performance.
|
|
Notes
Integer.toString(i, radix)
, 2 <= radix <= 36. For example, Integer.toString(11112222, 0)
will give 6m68u.