摘要:
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 ... 阅读全文
摘要:
Insertion Sort ListSort a linked list using insertion sort.SOLUTION: 使用一个dummynode 创建一个新的链,将旧的节点插入到新链中即可,相当简单哦! 1 /** 2 * Definition for singly-linke... 阅读全文
摘要:
Minimum Adjustment CostGiven an integer array, adjust each integers so that the difference of every adjcent integers are not greater than a given numb... 阅读全文
摘要:
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... 阅读全文
摘要:
Palindrome Partitioning IIGiven a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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.... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文