11.07.2015 Views

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

PrefacexvA sophomore-level class where students have only a little background in basicd<strong>at</strong>a structures or analysis (th<strong>at</strong> is, background equivalent to wh<strong>at</strong> would be hadfrom a traditional CS2 course) might cover Chapters 1-11 in detail, as well as selectedtopics from Chapter 13. Th<strong>at</strong> is how I use the book for my own sophomorelevelclass. Students with gre<strong>at</strong>er background might cover Chapter 1, skip mostof Chapter 2 except for reference, briefly cover Chapters 3 <strong>and</strong> 4, <strong>and</strong> then coverchapters 5-12 in detail. Again, only certain topics from Chapter 13 might be covered,depending on the programming assignments selected by the instructor. Asenior-level algorithms course would focus on Chapters 11 <strong>and</strong> 14-17.Chapter 13 is intended in part as a source for larger programming exercises.I recommend th<strong>at</strong> all students taking a d<strong>at</strong>a structures course be required to implementsome advanced tree structure, or another dynamic structure of comparabledifficulty such as the skip list or sparse m<strong>at</strong>rix represent<strong>at</strong>ions of Chapter 12. Noneof these d<strong>at</strong>a structures are significantly more difficult to implement than the binarysearch tree, <strong>and</strong> any of them should be within a student’s ability after completingChapter 5.While I have <strong>at</strong>tempted to arrange the present<strong>at</strong>ion in an order th<strong>at</strong> makes sense,instructors should feel free to rearrange the topics as they see fit. The book has beenwritten so th<strong>at</strong> once the reader has mastered Chapters 1-6, the remaining m<strong>at</strong>erialhas rel<strong>at</strong>ively few dependencies. Clearly, external sorting depends on underst<strong>and</strong>inginternal sorting <strong>and</strong> disk files. Section 6.2 on the UNION/FIND algorithm isused in Kruskal’s Minimum-Cost Spanning Tree algorithm. Section 9.2 on selforganizinglists mentions the buffer replacement schemes covered in Section 8.3.Chapter 14 draws on examples from throughout the book. Section 17.2 relies onknowledge of graphs. Otherwise, most topics depend only on m<strong>at</strong>erial presentedearlier within the same chapter.Most chapters end with a section entitled “Further Reading.” These sectionsare not comprehensive lists of references on the topics presented. R<strong>at</strong>her, I includebooks <strong>and</strong> articles th<strong>at</strong>, in my opinion, may prove exceptionally inform<strong>at</strong>ive orentertaining to the reader. In some cases I include references to works th<strong>at</strong> shouldbecome familiar to any well-rounded computer scientist.Use of Java: The programming examples are written in Java, but I do not wish todiscourage those unfamiliar with Java from reading this book. I have <strong>at</strong>tempted tomake the examples as clear as possible while maintaining the advantages of Java.Java is used here strictly as a tool to illustr<strong>at</strong>e d<strong>at</strong>a structures concepts. In particular,I make use of Java’s support for hiding implement<strong>at</strong>ion details, including fe<strong>at</strong>uressuch as classes, priv<strong>at</strong>e class members, <strong>and</strong> interfaces. These fe<strong>at</strong>ures of thelanguage support the crucial concept of separ<strong>at</strong>ing logical design, as embodiedin the abstract d<strong>at</strong>a type, from physical implement<strong>at</strong>ion as embodied in the d<strong>at</strong>astructure.

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

Saved successfully!

Ooh no, something went wrong!