摘要: Reverse a singly linked list. 题目标签:Linked List 题目给了我们一个链表,要求我们倒转链表。 利用递归,新设一个newHead = null,每一轮 把下一个 node 存入 next 记住,把目前的点 cursor 连到 newHead; 然后把 next 阅读全文
posted @ 2017-11-30 08:09 Jimmy_Cheng 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 -- 阅读全文
posted @ 2017-11-30 05:49 Jimmy_Cheng 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in 阅读全文
posted @ 2017-11-30 05:14 Jimmy_Cheng 阅读(178) 评论(0) 推荐(0) 编辑