Guided lesson

First Non-Repeating Character

Strings

See the input

Beginner

Input for First Non-Repeating Character: Count frequencies, then scan again to find the first count of one.

ABABCAB
pattern position: 0 - reuse what already matched
Step 1 O(n) time - O(k) space
Guided progression
6% lesson
Step 1 / 2Learner goal
Speech settings Speed 1.0 · Volume 90%

Keyboard: Space play/pause · Arrow keys step · Page Up/Down change sections · R restart