Guided lesson

Valid Anagram

Strings

See the input

Beginner

Input for Valid Anagram: Count characters in one string and subtract counts using the other string.

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