Locked
Pass the Dictionary check first
Everything after it builds on dictionaries. Each rep in the check has to be passed without opening the solution. Hints and Basics are fine.
Still to clear · 8 of 8
- Trace: keep the table
- Which line crashes?
- Write: menu from two lists
- Write: total a bill
- Debug: cheapest item
- Write: items under a budget
- Write: who sits where
- Write: apply price changes
Preview · where this ladder is heading
Longest Substring Without Repeating Characters
s is a string. Return the length of the longest stretch of consecutive characters in which no character appears twice.
The stretch must be unbroken. In "pwwkew", "pwke" doesn't count because it skips a character.
longest_unique("pwwkew") → 3 ("wke") longest_unique("") → 0
Aim for O(n).
ins = "abcabcbb"out3
ins = "bbbbb"out1
ins = "pwwkew"out3
You can read it now. The editor opens when the check is cleared.