LeetCode 141. 环形链表 Linked List Cycle

LeetCode 141. 环形链表 Linked List Cycle

LeetCode 141. 环形链表 Linked List CycleTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版给定一个链表,判断链表中是否有环。为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)...

LeetCode 234. 回文链表 Palindrome Linked List

LeetCode 234. 回文链表 Palindrome Linked ListTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版请判断一个链表是否为回文链表。示例 1:输入: 1->2输出: false示例 2:输入: 1->2->...

LeetCode 206. 反转链表 Reverse Linked List

LeetCode 206. 反转链表 Reverse Linked ListTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版反转一个单链表。示例:输入: 1->2->3->4->5->NULL输出: 5->4-&g...

LeetCode 237. 删除链表中的节点 Delete Node in a Linked List

LeetCode 237. 删除链表中的节点 Delete Node in a Linked List

LeetCode 237. 删除链表中的节点 Delete Node in a Linked ListTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版请编写一个函数,使其可以删除某个链表中给定的(非末尾)节点,你将只被给定要求被删除的节点。现有一个链...

LeetCode Contest 178-1367. 二叉树中的列表 Linked List in Binary Tree

LeetCode Contest 178-1367. 二叉树中的列表 Linked List in Binary Tree

LeetCode Contest 178-1367. 二叉树中的列表 Linked List in Binary Tree目录一、中文版二、英文版三、My answer四、解题报告一、中文版给你一棵以 root 为根的二叉树和一个 head 为第一个节点的链表...

LeetCode 328. Odd Even Linked List

LeetCode 328. Odd Even Linked List

DescriptionGiven a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number ...

LeetCode 142. Linked List Cycle II

LeetCode 142. Linked List Cycle II

DescriptionGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.To represent a cycle in the given linked lis...

LeetCode 234:回文链表 Palindrome Linked List

​请判断一个链表是否为回文链表。 Given a singly linked list, determine if it is a palindrome. 示例 1: 输入: 1->2 输出: false 示例 2: 输入: 1->2->2->1 输出: true 进阶:你能...

LeetCode 206:反转链表 Reverse Linked List

反转一个单链表。 Reverse a singly linked list. 示例: 输入: 1->2->3->4->5->NULL 输出: 5->4->3->2->1->NULL 进阶:你可以迭代或递归地反转链表。你能否用两种方法解决这道...

LeetCode 328:奇偶链表 Odd Even Linked List

​给定一个单链表,把所有的奇数节点和偶数节点分别排在一起。请注意,这里的奇数节点和偶数节点指的是节点编号的奇偶性,而不是节点的值的奇偶性。 请尝试使用原地算法完成。你的算法的空间复杂度应为 O(1),时间复杂度应为 O(nodes),nodes 为节点总数。 Given a singly linke...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。