// 滑动窗口 + Hashmap记录
public int lengthOfLongestSubstring(String s) {
HashMap<Character, Integer> menu = new HashMap<>();
int res = 0, left = 0;
for(int i = 0; i< s.length(); i++){
if(menu.containsKey(s.charAt(i))){
left = Math.max(left, menu
无重复最长字串 + 进阶
于 2022-05-12 14:53:53 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)