say you have a string: "hello". this is the sequence of characters:
[h, e, l, l, o]
spread it out a bit so the string looks like this, with "|" as the divider and the end-markers.
| h | e | l | l | o |
0 1 2 3 4 <- these are the indexes of the characters