05_ArrayBasedLists

05_ArrayBasedLists - Click to edit Master subtitle style ©...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Click to edit Master subtitle style © 2009 Dr. Tim Array Based Lists Dr. Tim Margush University of Akron © 2009 © 2009 Dr. Tim Goals • Implement the List ADT using arrays in more than one way • Compare the advantages of different implementations of an ADT • Recognize the shortcomings of array based implementations of lists © 2009 Dr. Tim © 2009 Dr. Tim Backing Store • Every List implementation requires a backing store – A data structure containing elements of the List • An array is one possible backing store © 2009 Dr. Tim © 2009 Dr. Tim Array Organization • Will the array be – fixed in size – expandable • Will the list items be – stored consecutively – be scattered throughout the array © 2009 Dr. Tim © 2009 Dr. Tim Impact on Methods • The add method – Always returns true if array can expand – Sometimes returns false when the underlying array has a fixed length • Requiring list elements to be stored consecutively – Simplifies searching and retrieval by position – Makes insertion and removal at interior locations more difficult © 2009 Dr. Tim © 2009 Dr. Tim Fixed Length Implementation public class Alist<E> implements ListInterface<E>{...
View Full Document

This note was uploaded on 02/22/2011 for the course CS 463 taught by Professor Dr. tim margush during the Fall '09 term at The University of Akron.

Page1 / 19

05_ArrayBasedLists - Click to edit Master subtitle style ©...

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

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