O'Reilly logo

Data Structures Using Java by Duncan A. Buell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

1
Introduction
1.1 The Course of This Course
In a nutshell, this course has two foci: The first is the efficient management and
manipulation of data. The second is the ability to implement methods for efficient
management and manipulation of data in a modern high-level programming lan-
guage, which in this case happens to be Java
TM
. This is not intended to be “a course
in Java”; rather, it is a course in the use of data structures and algorithms that uses
Java as the vehicle for turning concepts into the details of implementations. In the
final analysis, most people do not get paid to talk about how one might compute
something; they get paid to facilitate the actual computation of something. Really
knowing the details of implementation is thus very important. Students in computer
science should actually be happy that computers, compilers, and programming lan-
guages are as rigid as they are. This allows the rigorous testing of ideas, because
“the computer” is the final arbiter of correctness, and one can do one’s own testing
for correctness, unlike, say, mathematics, chemistry, or the law.
1
Many of the basic problems of data structures immediately present themselves
when dealing even with so simple a thing as an address book. Much of the purpose
of this text and the course it is intended to support is to present algorithms and
methods that are better in one way or another than the naive approaches that one
might take without thinking very hard.
We assume that a student who has entered an intermediate course already has
experience at an introductory level in the manipulation of data and in writing
programs to manipulate data. The most fundamental, and most naive, view of data
is usually that of a flat file. A flat file is simply a two-dimensional data array like
a spreadsheet. Each line can be viewed as a record. Each column can be viewed
as a field. In a simple example, one can think of an address book. Each record is
an individual “person,” and each record possesses fields for last name, first name,
street address, city, state, zip code, telephone number, and so forth. Actions that
1
Actually, there is nothing in the law that says one cannot determine what is legal or illegal
by the experimental method, but the penalties can be more substantial than having the compiler
simply inform you that your program has a bug.
1

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required