###### LeetCode-Reverse Linked List-解题报告

Reverse a singly linked list.

/**
* Definition for singly-linked list.
* struct ListNode {
*     int val;
*     ListNode *next;
*     ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* reverseList(ListNode* head) {
if (head == NULL)return NULL;
ListNode* tmp = head;
ListNode* current = tmp;

tmp = tmp->next;
current->next = NULL;

while (tmp != NULL)
{
ListNode* t = tmp->next;
tmp->next = current;
current = tmp;
tmp = t;
}
return current;
}
};

#### LeetCode-Palindrome Linked List-解题报告

2015-07-20 16:36:38

#### 【LeetCode】Reverse Nodes in k-Group 解题报告

2014-12-17 17:01:26

#### LeetCode 382. Linked List Random Node 解题报告

2016-09-22 21:24:32

#### [leetcode] 382. Linked List Random Node 解题报告

2016-08-12 04:45:46

#### 114. Flatten Binary Tree to Linked List（难）

2016-07-25 21:38:12

#### Linked List->single linked list

2016-08-01 01:00:20

#### leetcode-Reverse Linked List II-92

2016-06-06 22:38:38

#### Leetcode-Reverse Linked List-Python

2017-08-26 18:09:38

#### LeetCode-Reverse Linked List

2015-07-29 21:39:33

#### leetcode-Reverse Linked List

2015-11-04 22:11:44

## 不良信息举报

LeetCode-Reverse Linked List-解题报告