Skip to content

Instantly share code, notes, and snippets.

@paranoidxc
Created May 19, 2014 01:34
Show Gist options
  • Save paranoidxc/490732966ac394d70a3d to your computer and use it in GitHub Desktop.
Save paranoidxc/490732966ac394d70a3d to your computer and use it in GitHub Desktop.
link reverse( link x ) {
link t, y = x, r = NULL;
while ( y != NULL ) {
t = y->next;
y->next = r;
r = y;
y = t;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment