More on this book
Kindle Notes & Highlights
Then we survey fundamental algorithms for sorting, searching, graphs, and strings.
All code in the book is available on the booksite, in a form suitable for program development.
In this book we take the view that data structures exist as the byproducts or end products of algorithms and that we must therefore study them in order to understand the algorithms. Simple algorithms can give rise to complicated data structures and, conversely, complicated algorithms can use simple data structures.
The primary reason to learn about algorithms is that this discipline gives us the potential to reap huge savings, even to the point of enabling us to do tasks that would otherwise be impossible.
branch of computer science that comprises the study of such questions is called analysis of algorithms
should not use an algorithm without having
be expected to perform. Summary of topics As an overview, we describe the major parts of the book, giving specific topics covered and an indication of our general orientation toward
are sets of objects and connections, possibly with
It is important to note that +, -, *, and / are overloaded—the same symbol specifies operations in multiple different types, depending on context.
By encapsulating all the code that implements a data type within a single Java class, we enable the development of client code at a higher level of abstraction.
A bag is a collection where removing items is not supported—its purpose is to provide clients with the ability to collect items and then to iterate through the collected items (the client can also test if a bag is empty and find its number of items). The order of iteration is unspecified and should be immaterial to the client.