Skip to content

Commit 03a54ec

Browse files
committed
note
1 parent f8e54fd commit 03a54ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/main/java/com/chen/algorithm/znn/string/test3/Solution.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public int lengthOfLongestSubstring(String s) {
3939
Map<Character, Integer> map = new HashMap<>();
4040
int ans = 0;
4141
int n = s.length();
42-
43-
for (int start = 0, end = 0; end < n; end++) {
42+
int start = 0;
43+
for (int end = 0; end < n; end++) {
4444
char c = s.charAt(end);
4545
if (map.containsKey(c)) {
4646
start = Math.max(start, map.get(c));

0 commit comments

Comments
 (0)