soulmachine / leetcode

LeetCode题解,151道题完整版。
BSD 3-Clause "New" or "Revised" License
11.29k stars 3.43k forks source link

an optimization for problem: 12.5 Longest Substring Without Repeating Charac... #3

Closed hex108 closed 10 years ago

hex108 commented 10 years ago

With the optimization, it just need visit elements in the array once.

soulmachine commented 10 years ago

Great job !!