LinkedList - CSC438 DATA STRUCTURES Zulaile Mabni TOPIC 3 Linked List 1 CHAPTER OBJECTIVES Learn about the Java Collection Framework Learn about

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC438 D ATA S TRUCTURES TOPIC 3 Linked List Zulaile Mabni 1 7/26/2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C HAPTER O BJECTIVES Learn about the Java Collection Framework Learn about the List interface Learn about Linked List 2 Zulaile Mabni 7/26/2010
Background image of page 2
T HE L IST I NTERFACE 7/26/2010 3 Koffman E.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A RRAY L ISTS VS . L INKED L ISTS Array List: Fast access to elements Slower insertion/deletion of elements add and remove methods operate in linear time because they require a loop to shift elements in the underlying array. Linked list: Slower access to elements Fast insertion/deletion of elements ability to add or remove items anywhere in the list in constant time. 7/26/2010 4 Zulaile Mabni
Background image of page 4
5 L INKED L ISTS Definition: a list of items, called nodes, in which the order of the nodes is determined by the address, called the link, stored in each node. Every node in a linked list has two components: one to store relevant information one to store address (the link ) of next node in list 7/26/2010 Zulaile Mabni
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 L INKED L ISTS Address of first node in list stored in separate location, called the head or first Data type of each node depends on the specific application kind of data being processed link component of each node is a reference variable Data type of this reference variable is node type itself 7/26/2010 Malik D.S.
Background image of page 6
L INKED L ISTS Structure of a node Structure of a linked list 7/26/2010 7 Malik D.S.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 04/27/2011.

Page1 / 30

LinkedList - CSC438 DATA STRUCTURES Zulaile Mabni TOPIC 3 Linked List 1 CHAPTER OBJECTIVES Learn about the Java Collection Framework Learn about

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online