双指针
路漫远吾求索
电子,无线局域网
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode——142. Linked List Cycle II
题目Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.Follow up: Can you solve it without using extra space?原题: https://原创 2017-01-26 00:13:41 · 364 阅读 · 0 评论 -
Leetcode——61. Rotate List
题目Given a list, rotate the list to the right by k places, where k is non-negative.For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL.解答One Solution:/** * Definition for sin原创 2017-01-26 00:55:41 · 381 阅读 · 0 评论 -
Leetcode——75. Sort Colors
题目:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers 0,原创 2017-01-26 14:38:54 · 405 阅读 · 0 评论 -
Leetcode——86. Partition List
题目Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the nodes in each of th原创 2017-01-26 19:25:20 · 324 阅读 · 0 评论 -
Leetcode——287. Find the Duplicate Number
题目Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, f原创 2017-01-27 15:56:53 · 393 阅读 · 0 评论
分享