![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
链表
码不停Ti
信息安全在校大学生
展开
-
【LeetCode】141. Linked List Cycle[快慢指针]
Given a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed)in the linked list where tail co...原创 2019-12-10 11:23:49 · 323 阅读 · 0 评论 -
【LeetCode】23. Merge k Sorted Lists 分治
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[1->4->5,1->3->4,2->6]Output: 1->1->2->3->4-&...原创 2019-12-09 20:41:51 · 325 阅读 · 0 评论 -
【LeetCode】2. Add Two Numbers
题目描述You are given twonon-emptylinked lists representing two non-negative integers. The digits are stored inreverse orderand each of their nodes contain a single digit. Add the two numbers and...原创 2019-09-26 13:21:25 · 327 阅读 · 0 评论 -
【Leet Code】19. Remove Nth Node From End of List
19. Remove Nth Node From End of ListGiven a linked list, remove then-th node from the end of list and return its head.Example:Given linked list: 1->2->3->4->5, and n = 2.After re...原创 2019-10-02 23:41:56 · 290 阅读 · 0 评论 -
【LeetCode】21. Merge Two Sorted Lists
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:Input: 1->2->4, 1->3->4Output: 1-&...原创 2019-10-03 14:42:28 · 289 阅读 · 0 评论 -
【Leet Code】206. Reverse Linked List
Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULLFollow up:A linked list can be reversed either iteratively or recursivel...原创 2019-10-04 19:35:40 · 297 阅读 · 0 评论