WorkspaceLearning path
Level 1 · Foundations
BUILD YOUR INTUITION

Strings

Treat text as a sequence, but define what counts as a character before choosing indices.

THE MENTAL MODEL

When should this come to mind?

Treat text as a sequence, but define what counts as a character before choosing indices.

SubstringCharacter frequencyRepeated characters

What makes it work

These lessons count Unicode code points. JavaScript string indexing alone counts UTF-16 units.

When to choose something else

Text editing with many middle insertions requires a different representation.

See the pattern in action

Change the input. Follow the state. Make it yours.