## Lost Monkey

/**
* struct ListNode {
*     int val;
*     ListNode *next;
*     ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:

vector<int> v;
while(tmp != NULL ) {
v.push_back(tmp->val);
// struct ListNode* t = tmp->next;
tmp = tmp->next;
}

int len = v.size();
for (int i = 0; i < len ;++i) {
tmp->val = v[len - i - 1];
tmp = tmp->next;
}

}
};

/**
* struct ListNode {
*     int val;
*     struct ListNode *next;
* };
*/
struct ListNode* reverseList(struct ListNode* head) {

struct ListNode* tmp2;
struct ListNode* tmp3;

if (tmp1 != NULL) {
tmp2 = tmp1->next;
}
else return tmp1;
while(tmp2 != NULL) {

tmp3 = tmp2->next;
tmp2->next = tmp1;
tmp1 = tmp2;
tmp2 = tmp3;
}

return tmp1;

}

2014-01-28 01:06:19

2014-01-28 11:06:09

2015-05-16 14:28:52

#### 【LeetCode】92. Reverse Linked List II 解题报告

2017-03-28 09:42:23

#### leetcode 206: Reverse Linked List

2015-05-14 06:47:30

#### 【LeetCode】Reverse Linked List II 解题报告

2014-12-05 15:59:28

#### LeetCode 206. Reverse Linked List 题解（C++）

2016-10-23 16:18:19

2015-05-05 16:15:03

#### leetcode：92. Reverse Linked List II（Java）解答

2015-12-26 16:14:34

#### Reverse Linked List II -- LeetCode

2014-04-28 04:58:33