摘要: 题目链接: https://leetcode.com/problems/remove-linked-list-elements/ 分析: 增加一个哑节点,可以简化删除节点是否是头节点的操作,具体实现代码如下图所示: 阅读全文
posted @ 2016-05-19 16:50 Shirley_ICT 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://leetcode.com/problems/longest-substring-without-repeating-characters/ 开始思路是用一个hash记录字母以及相应的位置,用两指针的方法,一个指针指向头,一个指针往前走,当往前走的指针所指的字母在哈希表中出 阅读全文
posted @ 2016-05-19 16:22 Shirley_ICT 阅读(94) 评论(0) 推荐(0) 编辑