Home Page Icon
Home Page
Table of Contents for
Title
Close
Title
by Duncan A. Buell
Data Structures Using Java
Cover
Title
Copyright
Dedication
Contents
Preface
Chapter 1 Introduction
1.1 The Course of This Course
1.1.1 Layers of Software
1.1.2 Algorithms and Efficiency
1.1.3 Sorting
1.1.4 Maintaining Sorted Order
1.1.5 Indexing, Search, and Retrieval
1.1.6 Dynamic Versus Static Behavior
1.1.7 Memory and Bandwidth
1.1.8 Heuristics
1.1.9 Templates, Generics, and Abstract Classes
1.2 Examples
1.2.1 Card Catalogs
1.2.2 Student Records
1.2.3 Retail Transactions
1.2.4 Packet Traffic
1.2.5 Process Queues
1.2.6 Google
1.2.7 Game Trees
1.2.8 Phylogenetics
1.3 Summary
Chapter 2 A Review of Java
2.1 The Basic Data Payload Class
2.2 The Main Program
2.3 Comments about Style and Documentation
2.3.1 Javadoc
2.4 UML
2.5 Summary
2.6 Exercises
Chapter 3 Flat Files
3.1 A Basic Indexed File
3.1.1 A Basic Program
3.1.2 The Record Code
3.1.3 A Driver for the Application
3.1.4 The Original Flatfile Code
3.2 An Analysis of the Code
3.2.1 Sorted Data?
3.2.2 A Simple but Inefficient Sorting Algorithm
3.2.3 Searching Through a List
3.3 A Foreshadowing of Things to Come
3.3.1 Effective Sorting Techniques
3.3.2 Effective Search Techniques and Data Structures for Maintaining Priority
3.3.3 Static Versus Dynamic Storage Structures
3.3.4 Generic and Abstract Classes
3.3.5 Arrays Versus ArrayLists
3.4 Binary Search: Our First Mature Algorithm
3.5 Summary
3.6 Exercises
Chapter 4 Arrays and Linked Lists
4.1 Arrays and ArrayLists
4.2 Linked Lists
4.2.1 Linked Lists and Pointers
4.2.2 A Linked List Class
4.2.3 Exception Handling
4.2.4 Linked Lists Using Arrays
4.2.5 Arrays, ArrayLists, and the Free List
4.3 Insertionsort
4.4 Summary
4.5 Exercises
Chapter 5 Generics, Collections, and Testing
5.1 Using Generics for the Data Payload
5.2 Objects and Equality
5.3 The Java LinkedList
5.4 Iterators
5.4.1 The Justification for Iterators
5.5 Implementing Our Very Own Collection
5.6 Testing with JUnit
5.7 Reflection
5.8 Summary
5.9 Exercises
Chapter 6 Estimating Asymptotic Efficiency
6.1 Analysis of Algorithms
6.1.1 The Definition of a “Logarithm”
6.1.2 A Few Comments about the Real World
6.2 Some Rigor
6.2.1 An Apology for Some Audacity
6.2.2 Basic Orders of Magnitude, and Some Intuition
6.2.3 Constants Don’t Matter
6.2.4 Constant Startup Costs Don’t Matter
6.2.5 Big Oh Is Transitive
6.2.6 All Logarithms Are the Same
6.2.7 All Polynomials of the Same Degree Are the Same
6.2.8 All Reasonable Cost-of-Work Functions Go Off to Infinity
6.3 Some More Rigor
6.3.1 Little oh
6.3.2 Big Theta, and Some More Simplifying Theorems
6.3.3 Ignoring Fencepost Issues
6.3.4 Basic Orders of Magnitude Revisited
6.4 More Intuition—Common Asymptotics
*6.5 Exponential Orders of Magnitude
6.5.1 Exponential Orders of Magnitude
*6.6 Big Omega
6.6.1 Traditional Big Omega (Hardy,about 1915)
6.6.2 Knuth’s Big Omega (Knuth,about 1975)
6.7 What Do We Count?
6.8 Binary Divide and Conquer Is Optimal
6.9 Summary
6.10 Exercises
Chapter 7 Stacks and Queues
7.1 Stacks
7.1.1 Exception Handling
7.1.2 Stacks Using Nodes
7.1.3 Stacks Using Arrays
7.1.4 Reverse Polish Arithmetic
7.2 HTML/XML and Stacks
7.3 Queues
7.3.1 Queues Using Nodes
7.3.2 Queues Using Arrays
7.4 The JCF Classes
7.4.1 The JCF Stack
7.4.2 The JCF Queue
7.4.3 Stacks, Queues, and Deques
7.5 Priority Queues
7.5.1 The Heap
7.5.2 Creating a Heap
7.5.3 Maintaining the Heap
7.6 Summary
7.7 Exercises
Chapter 8 Recursion
8.1 Factorials and Fibonacci Numbers
8.2 The Collatz Problem
8.3 Greatest Common Divisor
8.4 The Ackermann Function
8.5 Binary Divide-and-Conquer Algorithms
8.6 Permutations and Combinations
8.7 Gaming and Searching Applications
8.8 Implementation Issues
8.9 Summary
8.10 Exercises
Chapter 9 A First Look at Graphs
9.1 Formal Notions of a Graph
9.2 Examples of Graphs
9.3 Transitive Closure
9.3.1 Facebook Graphs
9.3.2 Theory
9.3.3 Applications in Computing
9.4 Local–Global Questions
9.5 Greedy Algorithms
9.6 Summary
9.7 Exercises
Chapter 10 Trees
10.1 Trees
10.2 Spanning Trees
10.3 Data Structures for Trees
10.4 Binary Trees
10.4.1 Implementing Binary Trees with Nodes
10.4.2 Implementing Binary Trees with Arrays
10.5 The Heap
10.6 Traversing a Tree
10.6.1 Breadth-First and Depth-First Traversal
10.6.2 Traversal on Parallel Computers
10.7 Summary
10.8 Exercises
Chapter 11 Sorting
11.1 Worst-Case, Best-Case, and Average-Case
11.2 Bubblesort
11.3 Insertionsort
11.4 Improving Bubblesort
11.5 Heapsort
11.6 Worst-Case, Best-Case, and Average-Case (Again)
11.7 Mergesort
11.7.1 Analysis of Mergesort
11.7.2 Disk-Based Sorting
11.8 Quicksort
11.8.1 The Quicksort Algorithm
11.8.2 Average-Case Running Time for Quicksort
11.9 Sorting Without Comparisons
11.10 Experimental Results
11.11 Auxiliary Space and Implementation Issues
11.11.1 Space Considerations
11.11.2 Memory
11.11.3 Multilevel Sorts
11.11.4 Stability
11.12 The Asymptotics of Sorting
11.12.1 Lower Bounds on Sorting
11.12.2 A Proof of Lower Bounds
11.12.3 Lower Bounds for the Average Case
*11.13 Sorting in Parallel
11.13.1 Analysis
11.14 Summary
11.15 Exercises
Chapter 12 Searching
12.1 Associative Matching
12.2 Indexing for Search
12.3 Binary Search Trees
12.3.1 Inorder Traversal and Binary Search Trees
12.3.2 Building a Binary Search Tree
12.4 Sophisticated Search Trees
12.5 Hashing
12.6 Random Numbers and Hash Functions: A Brief Digression
12.6.1 Random Numbers
12.6.2 Cryptographic Hash Functions
12.6.3 Random Numbers in Java
12.7 The Java Collections Framework
12.8 The Java HashSet
12.8.1 A Spell-Checking Program
12.9 The Java TreeMap
12.9.1 A Digression on Documentation
12.10 The Java TreeSet, HashMap, and LinkedList
12.11 Summary
12.12 Exercises
Chapter 13 Graphs
13.1 Graphs and Applications
13.2 Adjacency Matrices and Linked Lists
13.2.1 Adjacency Matrices
13.2.2 Sparse Graphs and Sparse Matrices
13.2.3 Linked Lists for Sparse Graphs
13.2.4 A Middle Ground, Somewhat Helped by Java
13.3 Breadth-First and Depth-First Search
13.4 Graph Problems
13.4.1 NP-Completeness
13.4.2 Eulerian Cycles
13.4.3 Connected Components
13.4.4 Spanning Trees
13.4.5 Shortest Path
13.4.6 Hamiltonian Cycles
13.4.7 Traveling Salesman Problem
13.4.8 Cliques
13.5 Summary
13.6 Exercises
Appendix A The Author’s Idiosyncrasies of Coding Style
A.1 Utilities
A.2 Log Files
A.3 Labeling Trace Output
A.4 Naming Conventions
A.5 Use of this in Java
A.6 Labeling Closing Braces
A.7 Keep It Simple
A.8 The Infamous Double Equals
Appendix B File Utilities
B.1 Header, Boilerplate, and a Log File
B.2 Setting Up an Output PrintWriter File
B.3 Setting Up an Input Scanner File
Appendix C Glossary
C.1 The Nature of Jargon
C.2 Terms Used in This Book
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Copyright
J
AV
A
J
AV
A
DA
T
A
STRUCTURES
USING
DUNCAN A. BUELL
University of South Car
olina
™
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset