摘要: https://leetcode.com/problems/add-two-numbers/description/You are given two non-empty linked lists representing two non-negative integers.The digits are stored in reverse order and each of their nodes... 阅读全文
posted @ 2018-02-23 11:34 davidnyc 阅读(148) 评论(0) 推荐(0)
摘要: time: o(n) complexity: o(1) 阅读全文
posted @ 2018-02-23 10:06 davidnyc 阅读(108) 评论(0) 推荐(0)
摘要: 230,82,83 是一类题 time o(1) space o(1) 阅读全文
posted @ 2018-02-23 08:27 davidnyc 阅读(97) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/remove-duplicates-from-sorted-list/description/Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return... 阅读全文
posted @ 2018-02-23 07:06 davidnyc 阅读(117) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/partition-list/description/ Given a linked list and a target value T, partition it such that all nodes less than T are l 阅读全文
posted @ 2018-02-23 02:38 davidnyc 阅读(123) 评论(0) 推荐(0)
摘要: Description Insert a value in a sorted linked list. Examples L = null, insert 1, return 1 -> null L = 1 -> 3 -> 5 -> null, insert 2, return 1 -> 2 -> 阅读全文
posted @ 2018-02-23 01:43 davidnyc 阅读(195) 评论(0) 推荐(0)