输入一个链表,将链表反转后,输出新链表的表头
struct ListNode{
int val;
struct ListNode *next;
};
/**
* @param pHead ListNode类
* @return ListNode类
*/
struct ListNode* ReverseList(struct ListNode* pHead) {
// write code here
输入一个链表,将链表反转后,输出新链表的表头
struct ListNode{
int val;
struct ListNode *next;
};
/**
* @param pHead ListNode类
* @return ListNode类
*/
struct ListNode* ReverseList(struct ListNode* pHead) {
// write code here