— I realize that .end might also not be the most elegant solution
— Hello, in storage:
["H", "e", "l", "o"]
Hello, in representation:
[0,1,2,2,3]
— That is the basic idea behind seperating, although you'd likely go with a different implementation
— If I added "Help", I'd get:
["H", "e", "l", "o", "p"]
— And, then represent it via: [0,1,2,4]
— So it would only store unique chars, and a 2d array of indexes?
— Something like that, yes