23.11.2014 Views

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

of a phase, it should clear all the access counts <strong>and</strong> start the next phase.<br />

Experimentally, determ<strong>in</strong>e what are the best values of N for various list sizes.<br />

P-6.5<br />

Write a complete adapter class that implements the sequence ADT us<strong>in</strong>g a<br />

java.util.ArrayList object.<br />

P-6.6<br />

Implement the favorites list application us<strong>in</strong>g an array list <strong>in</strong>stead of a list.<br />

Compare it experimentally to the list-based implementation.<br />

Chapter Notes<br />

The concept of view<strong>in</strong>g data structures as collections (<strong>and</strong> other pr<strong>in</strong>ciples of objectoriented<br />

design) can be found <strong>in</strong> object-oriented design books by Booch [14], Budd<br />

[17], Golberg <strong>and</strong> Robson [40], <strong>and</strong> Liskov <strong>and</strong> Guttag [69]. Lists <strong>and</strong> iterators are<br />

pervasive concepts <strong>in</strong> the <strong>Java</strong> Collections Framework. Our node list ADT is derived<br />

from the "position" abstraction <strong>in</strong>troduced by Aho, Hopcroft, <strong>and</strong> Ullman [5], <strong>and</strong> the<br />

list ADT of Wood [100]. Implementations of lists via arrays <strong>and</strong> l<strong>in</strong>ked lists are<br />

discussed by Knuth [62].<br />

372

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!