linked lists

S

SpeedRunner

Guest
In my java/data structures class, I have been tipped by another student (who failed the class before and is taking it again). That the next thing thats gonna hit us after spring break is going to be linked lists. He says we're going to be using them in many different forms, and that its very difficult. He said also said that linked lists killed 70% of the class last time. Probably an exaggeration, but anyway, I figured that I should take the opportunity to learn what linked lists are and how to use them before I get hit with them. So, my friends, what are linked lists? :D
 
http://www.nist.gov/dads/

Specifically: http://www.nist.gov/dads/HTML/linkedList.html

http://www.cs.wisc.edu/~vernon/cs367/notes/4.LINKED-LIST.html

There are several kinds of linked lists, the most common ones are probably singly linked lists and doubly linked lists.

A linked list has some number of data fields, and a link (reference/pointer) to the next node.

HEAD -> [DATA][LINK] -> [DATA][LINK] -> [DATA][LINK] -> [DATA][TAIL]

The above is an example of a singly linked list, in which each node has a single link to the next.

There is a lot more to it, but read those links above.
 
If your friend failed data structures, I'd look for a new source of information...
 
Spleeze said:
If your friend failed data structures, I'd look for a new source of information...

Well he took the class before. Which means he knows what the agenda is.
 
Linked Lists are cool

I'd agree that you should not trust the comments of someone who failed the course :rolleyes:
In saying that, he probebly is telling the truth about the fact that your going to cover it, not nessesarily next but the odds are you will cover them sooner or later.

They are very simple things.

Based on BillLeeLee's "diagram", I'd guess he knows about them, so I'd say the links he's given willl be a usefull reference for you to nosey at :)
 
Hopefully, when you cover this topic in class, you'll also go deep on the performance characteristics of the structure.

What textbook are you using?
 
CoreJava2 Volume 1 and 2 by horstmann and cornell. seventh edition. I'm not sure whether the linked lists are in volume 1 or 2, I haven't been able to find them.
 
Spleeze said:
If your friend failed data structures, I'd look for a new source of information...

lol, seriously. linked lists are not a difficult concept. binary trees were a little funky though
 
linked lists aren't that bad really, just make sure to follow the pointers. Then again I took Data Structures with Ada.
 
Back
Top