3 ms·
It sounds like you need to build on the strengths of the JS implementations you care about, and encode your data structure in a string or something. Have a jum
by wingo 16y ago
It sounds like you need to build on the strengths of the JS implementations you care about, and encode your data structure in a string or something. Have a jump table in the beginning with the first characters, and then likewise for other characters, with some other convention to denote leafs. You won't be able to add to the trie, lookup won't be as fast, but it would still be O(log N) and parsing would be dead simple.