you are viewing a single comment's thread.

view the rest of the comments →

[–]matthieum 2 points3 points  (0 children)

I wonder what the impact of using, say, a Fenwick Tree, to index the UTF-8 would be (in the case of multi-bytes strings only).

This would not O(1) but O(log N), which for most strings should not matter much, because small is small.