Click here to see the full article post
ASCII has 256 chars with extended codes. http://www.ascii-code.com/
@manijeh With something extra it's not ASCII anymore. And if you do want to cover ASCII extensions, then 256 is still wrong, as you need far more for example for UTF-8/Unicode.
The defect of this technique is in some programming languages it may cause memory problems, especially when the method is called frequently. Such as in java, C#, python, and so on, in these languages, frequently allocate arrays (or hashtable) and deallocate them, will cause gc problems. C++ may be better, because it can allocate a fixed length array on stack, and can deallocate the hashtable memory in time
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.