讨论一道G的题find longest substring which contains just two unique characters.# JobHunting - 待字闺中
h*n
1 楼
比如
abcbcbcbcbcddd 返回bcbcbcbcbc
abbbcccbbbcccd 返回bbbcccbbbccc
看了以前的一些帖子,说是用两个指针夹起来做,能做到O(n)
不过具体细节怎么也想不明白,请指教,如果有具体的code学习就更好了
多谢
abcbcbcbcbcddd 返回bcbcbcbcbc
abbbcccbbbcccd 返回bbbcccbbbccc
看了以前的一些帖子,说是用两个指针夹起来做,能做到O(n)
不过具体细节怎么也想不明白,请指教,如果有具体的code学习就更好了
多谢