Here is the picture of lecture notes:
Add character located at right index of input string into our Set, checking if it already exist
- Doesn't Exist:
Add to set, right++; update max (expand our window)
- Exists
Remove character at left pointer from set; left++; (shift our window)
Repeat until right index and left index have reached the length of input.
Actionable Items
I like to watch a few times, and also figure out how to explain the algorithm based on Daniel Su's presentation.
No comments:
Post a Comment