摘要: A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The 阅读全文
posted @ 2016-08-06 10:16 amazingzoe 阅读(205) 评论(0) 推荐(0)
摘要: 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- 阅读全文
posted @ 2016-08-06 07:43 amazingzoe 阅读(112) 评论(0) 推荐(0)
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in 阅读全文
posted @ 2016-08-06 04:20 amazingzoe 阅读(136) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2016-08-06 03:34 amazingzoe 阅读(106) 评论(0) 推荐(0)
摘要: Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3].... Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possible 阅读全文
posted @ 2016-08-06 03:32 amazingzoe 阅读(136) 评论(0) 推荐(0)