上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 24 下一页
摘要: 1. 原始题目 You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their node 阅读全文
posted @ 2019-04-07 11:43 三年一梦 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: 2. 题目理解 将m至n的链表反转。注意下标这里在链表中实际上是m-1至 阅读全文
posted @ 2019-04-07 11:02 三年一梦 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should prese 阅读全文
posted @ 2019-04-07 09:50 三年一梦 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 Given 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 list, 阅读全文
posted @ 2019-04-06 11:53 三年一梦 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 Given a singly linked list, determine if it is a palindrome. Example 1: Example 2: 2. 题目理解 判断给定链表是否为回文。即正反节点数字一样。例如1234321,无论正反都是这个。就是对称。 坑:空链 阅读全文
posted @ 2019-04-06 10:47 三年一梦 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 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 阅读全文
posted @ 2019-04-06 10:09 三年一梦 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: beg 阅读全文
posted @ 2019-04-05 19:44 三年一梦 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 Given a non-empty, singly linked list with head node head, return a middle node of linked list. If there are two middle nodes, return the seco 阅读全文
posted @ 2019-04-05 16:34 三年一梦 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: 2. 题目理解 给定一个排序链表,删除所有重复的元素,使得 阅读全文
posted @ 2019-04-05 11:47 三年一梦 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 1. 原始题目 Design your implementation of the linked list. You can choose to use the singly linked list or the doubly linked list. A node in a singly link 阅读全文
posted @ 2019-04-05 10:48 三年一梦 阅读(207) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 24 下一页