摘要: Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: Input: 1->2->2->1 Output: true /** * Defi 阅读全文
posted @ 2019-12-31 11:48 xuan_abc 阅读(125) 评论(0) 推荐(0)
摘要: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
posted @ 2019-12-31 11:07 xuan_abc 阅读(117) 评论(0) 推荐(0)
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: 阅读全文
posted @ 2019-12-31 06:19 xuan_abc 阅读(114) 评论(0) 推荐(0)
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Input: 1->2 阅读全文
posted @ 2019-12-31 05:42 xuan_abc 阅读(95) 评论(0) 推荐(0)