![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode String
akihiro_the_coder
这个作者很懒,什么都没留下…
展开
-
【LeetCode】第一次mock interview
653 - Two Sum IV - Input is a BSThttps://leetcode.com/problems/two-sum-iv-input-is-a-bst/第一题edge case没过,心想着找到target就是在现在traverse的node的value上找到其与target的相差,然后在整个树里找相差,虽然时间是慢了点,但是就是我当时能想出来的唯一办法了orz。。结果...原创 2019-07-22 01:36:49 · 287 阅读 · 0 评论 -
【LeetCode】String题集合
寻找最长没有重复字母的substringNote that BF will take too much time!这题的特点在于如果出现一次重复就可以直接从重复的那个字符开始继续往后面搜,那么就可以用一个HashMap来存每个字母的last occurence。记录下前面的non-repeated substring的长度,update the result number iff anoth...原创 2019-07-28 03:54:32 · 90 阅读 · 0 评论