上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 17 下一页

2014年12月10日

摘要: Linked List Cycle IIGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without ... 阅读全文
posted @ 2014-12-10 15:58 Yu's Garden 阅读(872) 评论(0) 推荐(0) 编辑
摘要: Insertion Sort ListSort a linked list using insertion sort.SOLUTION: 使用一个dummynode 创建一个新的链,将旧的节点插入到新链中即可,相当简单哦! 1 /** 2 * Definition for singly-linke... 阅读全文
posted @ 2014-12-10 15:38 Yu's Garden 阅读(646) 评论(0) 推荐(0) 编辑

2014年12月9日

摘要: Minimum Adjustment CostGiven an integer array, adjust each integers so that the difference of every adjcent integers are not greater than a given numb... 阅读全文
posted @ 2014-12-09 18:47 Yu's Garden 阅读(6623) 评论(7) 推荐(2) 编辑

2014年12月7日

摘要: Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the fir... 阅读全文
posted @ 2014-12-07 14:45 Yu's Garden 阅读(545) 评论(0) 推荐(0) 编辑

2014年12月6日

摘要: Palindrome Partitioning IIGiven a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for ... 阅读全文
posted @ 2014-12-06 22:28 Yu's Garden 阅读(967) 评论(0) 推荐(0) 编辑
摘要: Jump Game II Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represent... 阅读全文
posted @ 2014-12-06 21:59 Yu's Garden 阅读(2388) 评论(0) 推荐(0) 编辑
摘要: Triangle Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, give... 阅读全文
posted @ 2014-12-06 04:02 Yu's Garden 阅读(804) 评论(0) 推荐(0) 编辑

2014年12月5日

摘要: Merge k Sorted ListsMerge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Show Tags参考资料: http://blog.csdn.... 阅读全文
posted @ 2014-12-05 10:37 Yu's Garden 阅读(1056) 评论(0) 推荐(0) 编辑

2014年12月4日

摘要: 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... 阅读全文
posted @ 2014-12-04 19:13 Yu's Garden 阅读(417) 评论(0) 推荐(0) 编辑

2014年12月3日

摘要: Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3... 阅读全文
posted @ 2014-12-03 23:03 Yu's Garden 阅读(471) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 17 下一页

导航