摘要:
Link: https://leetcode.com/problems/partition-list/ Idea Create two lists, one for keeping track of nodes with value smaller than x, the other for kee
阅读全文
posted @ 2021-08-08 21:35
blackraven25
阅读(29)
推荐(0)
编辑
摘要:
Link: https://leetcode.com/problems/reorder-list/ Idea Find the middle point of the list and divide the list into two parts by setting mid.next = null
阅读全文
posted @ 2021-08-08 21:08
blackraven25
阅读(21)
推荐(0)
编辑
摘要:
Link: https://leetcode.com/problems/merge-two-sorted-lists/ Constarints: The number of nodes in both lists is in the range [0, 50]. -100 <= Node.val <
阅读全文
posted @ 2021-08-08 16:58
blackraven25
阅读(12)
推荐(0)
编辑
摘要:
Link: https://leetcode.com/problems/linked-list-cycle-ii/ Idea If there's a cyle, we have the following findings: Here 'a' means the distance from hea
阅读全文
posted @ 2021-08-08 16:41
blackraven25
阅读(18)
推荐(0)
编辑
摘要:
Link: https://leetcode.com/problems/linked-list-cycle/ Constraints: Idea Using the two pointers technique, slow and fast would point to the same node
阅读全文
posted @ 2021-08-08 12:11
blackraven25
阅读(22)
推荐(0)
编辑
摘要:
Link: https://leetcode.com/problems/middle-of-the-linked-list/ Constraints: The number of nodes in the list is in the range [1, 100]. 1 <= Node.val <=
阅读全文
posted @ 2021-08-08 12:04
blackraven25
阅读(17)
推荐(0)
编辑