标签:
public class Solution { // 遍历,拿到一个节点处理一个 public ListNode ReverseList(ListNode head) { ListNode prev = null; ListNode curt = head; while(curt != null){ ListNode tmp = curt; curt = curt.next; tmp.next = prev; prev = tmp; } return prev; } }
标签:
原文地址:http://www.cnblogs.com/hesier/p/5584745.html