Leetcode Longest Substring Without Repeating Characters Solution using Go
Problem 3. Longest Substring Without Repeating Characters
Algorithm:
Maintain a hashmap which stores the characters(asci value) in string as keys and their positions as values.
var seen = map[byte]int{}
Note: as we know string is just slice of byte...
goleetcode.hashnode.dev2 min read