Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Reverse Linked List

 public ListNode ReverseList(ListNode head) 
 {
   if(head==null || head.next == null)
   	return head;

  var t = ReverseList(head.next);
  head.next.next = head;
  head.next = null;

  return t;
}
Source by leetcode.com #
 
PREVIOUS NEXT
Tagged: #Reverse #Linked #List
ADD COMMENT
Topic
Name
4+3 =