Linked List Study Note

Reverse a Linklist

The basic idea of reversing a linked list is “take out items and put in a new list(actually, this is not a real new list but a new reference), let the next item point to the former one”.

reverseLink

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s