index
title: 无重复字符的最长子串 date: 2019-08-21T11:00:41+08:00 draft: false categories: leetcode
头条重点
题目
给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。
解题思路
用 Map 记录字符所在位置,当遇到重复字符时,移动
start
指针替换 Map 中下标,并计算子串长度
Last updated
Was this helpful?