Reverse a list
Anonymous
public void ReverseList(NodeList node) { if (node == null) { return ; } NodeList prev = null; ; NodeList current = node; NodeList next = current.next; while (next != null) { next = current.next; current.next = prev; prev = current; current = next; } }
Check out your Company Bowl for anonymous work chats.