- 博客(3)
- 收藏
- 关注
原创 LeetCode:Reverse Nodes in k-Group Java实现
LeetCode题目:Reverse Nodes in k-Group题目概述Given this linked list: 1->2->3->4->5For k = 2, you should return: 2->1->4->3->5For k = 3, you should return: 3->2->1->4-&g...
2019-04-10 21:22:43
277
原创 LeetCode:Swap Nodes in Pairs Java实现
LeetCode题目:Swap Nodes in Pairs题目概述Given 1->2->3->4,Return 2->1->4->3.解题方法迭代public ListNode swapPairs(ListNode head) { if (head==null || head.next==null) { return head;...
2019-04-08 11:49:21
172
原创 LeetCode:Reverse Linked List Java实现
LeetCode题目:reverse linked list题目概述:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULL解题方法迭代:public ListNode reverseList(ListNode head) { if (head==nul...
2019-04-08 11:02:08
201
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅