Add one restrain for the String length.
Modify for-loop using boolean[256].
Add more solutions