Longest Substring without Repeating Characters
Let’s practice a Leetcode problem with Go map here.
Find the longest non-repetitive substring, e.g. abcabcbb ==> abc
but abca
is not.
Here’s my algorithm:
1 | package main |
The outputs are:
1 | 3 |
Let’s practice a Leetcode problem with Go map here.
Find the longest non-repetitive substring, e.g. abcabcbb ==> abc
but abca
is not.
Here’s my algorithm:
1 | package main |
The outputs are:
1 | 3 |