Author: techfox9

Reversing a singly-linked list in Java ..

Dec 27, 2009 in Algorithms, Java

From http://www.informatics.susx.ac.uk/courses/dats/notes/html/node46.html

public void reverse(ListNode head) {
    ListNode current = head;
    head = null;
    ListNode save = null;
    while (current != null) {
        save = current;
        current = current.next;
        save.next = head;
        head = save;
    }
}


Five latest

Reversing a singly-linked list in Java ..

Dec 27, 2009 by techfox9 in Algorithms, Java

Breadth-first traversal algorithm..

Dec 02, 2009 by techfox9 in Algorithms, Java

Quick Eclipse Shortcuts ..

Oct 28, 2009 by techfox9 in Eclipse, Uncategorized

J2EE 1.4 EJBs Notes..

Oct 22, 2009 by techfox9 in Uncategorized

Subversion update dry-run ..

Sep 16, 2009 by techfox9 in Subversion