摘要: 题目链接:https://leetcode.com/problems/insertion-sort-list/ 题目分析: 其实搞清楚指针的变化就很容易 如下是代码: 阅读全文
posted @ 2016-05-24 15:44 Shirley_ICT 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://leetcode.com/problems/reorder-list/ 分析: 注意这里寻找中间节点的时候需要增加一个哑巴节点,否则1->2这种就会出错,具体代码如下: 阅读全文
posted @ 2016-05-24 12:57 Shirley_ICT 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/ 分析: 设置三个指针,pre, cur, next, 然后进行模拟删除操作,比较简单,具体代码如下: 阅读全文
posted @ 2016-05-24 11:25 Shirley_ICT 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 在英文中,如果是一些比较正式的场合,邮件开头要写dear xxx,而不是写hello xxxx 学习到几个比较重要的英语单词 intimate 私人的 etiqutte 规矩;礼节 authentic 真实的,可信的 to tip or not to tip 美国人用晚餐一般要给消费, 20%左右( 阅读全文
posted @ 2016-05-21 11:53 Shirley_ICT 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://leetcode.com/problems/remove-linked-list-elements/ 分析: 增加一个哑节点,可以简化删除节点是否是头节点的操作,具体实现代码如下图所示: 阅读全文
posted @ 2016-05-19 16:50 Shirley_ICT 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://leetcode.com/problems/longest-substring-without-repeating-characters/ 开始思路是用一个hash记录字母以及相应的位置,用两指针的方法,一个指针指向头,一个指针往前走,当往前走的指针所指的字母在哈希表中出 阅读全文
posted @ 2016-05-19 16:22 Shirley_ICT 阅读(91) 评论(0) 推荐(0) 编辑
摘要: cappuccino 阅读全文
posted @ 2016-05-18 11:04 Shirley_ICT 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 和人打招呼的几种方式: 1)Afternoon. 2) Alright? 3) Hey! 4) Hi there. 5) Hiya! 6) How's it going? 7) Nice to meet you. 阅读全文
posted @ 2016-05-17 20:34 Shirley_ICT 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode.com/problems/odd-even-linked-list/ 题目很简单,注意哑巴节点的使用,可以简化复杂度 代码如下: 阅读全文
posted @ 2016-05-15 22:20 Shirley_ICT 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode.com/problems/word-search/ 阅读全文
posted @ 2016-05-15 19:57 Shirley_ICT 阅读(123) 评论(0) 推荐(0) 编辑