Share this post! | Vote this! |
|
Linked Lists are an alternative to ArrayLists that Computer Scientists
have come up with. While an ArrayList uses an array internally to store
the data, a LinkedList uses nodes to hold the elements. These nodes then
point to each other, thus leading to the name "Linked" List. There are
three types of Linked Lists: singly-linked lists, doubly-linked lists
and circularly-linked lists. Singly-linked lists work by having each
node pointing to the next node, with the tail node (or end node)
pointing to nothing (or a null reference). Doubly-linked lists expand
upon the singly-linked list, with each node pointing to the previous
node as well as the next node. In doubly-linked lists, both the head
node (first node) and the tail node point to nothing. Circularly-linked
lists expand upon the singly-linked list differently than the
doubly-linked list; instead of having the tail node pointing to nothing,
it "circles" back around, pointing to the head element as the name
suggests. more...
0 comments:
Post a Comment