会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
天丶下
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
2015年4月7日
19:Remove Nth Node From End of List【两指针】【链表】
摘要: 题目连接:https://leetcode.com/problems/remove-nth-node-from-end-of-list//** * Definition for singly-linked list. * struct ListNode { * int val; * ...
阅读全文
posted @ 2015-04-07 18:00 天丶下
阅读(100)
评论(0)
推荐(0)
2015年4月3日
61:Rotate List(旋转链表)【链表】【两指针】
摘要: 题目链接:https://leetcode.com/problems/rotate-list//* 题意:给出一个链表,将链表向右旋转k个位置 *//** *思路:右旋k个位置,相当与将链表从第len-k个位置截断,然后 * 将两截链表交换位置,重新链接成一个链表 * */stru...
阅读全文
posted @ 2015-04-03 13:07 天丶下
阅读(134)
评论(0)
推荐(0)
2015年3月23日
leetcode Rotate Array【数组】
摘要: 题目链接:https://leetcode.com/problems/rotate-array/ 1 /*题意:将数组向右旋转k个位置*/ 2 3 /* 4 *三次翻转数组,第一次翻转整个数组,第二次翻转前k个数,第三次翻转剩下的数 5 *第一次翻转:7,6,5,4,3,2,1 6 *第二次...
阅读全文
posted @ 2015-03-23 20:27 天丶下
阅读(221)
评论(0)
推荐(0)
leetcode two Sum【数组】
摘要: 题目链接:https://leetcode.com/problems/two-sum/ 1 /*题意:在数组中找出两个数的和等于target,输出下标*/ 2 3 /*思路: 4 *将键值存入map中,接着扫描数组,检查target与当前数的差值是否在map中 5 *如果存在,返回结果 6 ...
阅读全文
posted @ 2015-03-23 20:05 天丶下
阅读(132)
评论(0)
推荐(0)
上一页
1
2
公告