Golang: explanation (100% speed & memory)
dict is our dictionary of previously encountered characters\n2. Increment i and use character s[i] as index in dict to set value to true: dict[s[i]] = true\n3. 
1. `dict` is our dictionary of previously encountered characters\n2. Increment `i` and use character `s[i]` as index in `dict` to set value to `true`: `dict[s[i]] = true`\n3. With each step we increment `length` and compare it to `max` value and set `max = length` if length now bigger.\n4. When we face character we already marked in `dict` (`dict[s[i]] == true`), we increment secord iterator j, unmark characters in dictionary `dict[s[j]] = false` and decrement `length` until `dict[s[i]] == false`.\n5. We repeat steps `(2)-(4)` while `i < len(s)`.\n\n```go\nfunc lengthOfLongestSubstring(s string) int {\n    dict := [128]bool{}\n    length, max := 0, 0\n    for i, j := 0, 0; i < len(s); i++ {\n        index := s[i]\n        if dict[index] {\n            for ;dict[index]; j++ {\n                length--\n                dict[s[j]] = false\n            }\n        }\n        \n        dict[index] = true\n        length++\n        if length > max {\n            max = length\n        }\n    }\n    return max\n}\n```
['Go']