Book read: Data Structures and Algorithms using Java

Recently I had a reminder that my algorithmic knowledge is less than stellar. This inspired me to read some books on the subject. I started with Data Structures and Algorithms using Java (note the “using” word, there’s a very similar book called Data Structures and Algorithms in Java). I thought a post would be nice on it, so here it comes.

Basically it’s a university textbook, so it’s very accessible but has some quirks. I’d note that referring to all practices, results and evolution of the software industry (the part of it which isn’t considered as academia) as good penmanship is a little bit pejorative at least. One more thing and I’ll finish my rant. I don’t like religious wars on where to put your starting braces, when I program in C# I consistently put them on a new line. When I use Java or Objective-C I always put them on the end of the line. But I didn’t even possibly think of putting them on a new line, then continue writing code on that very same line. So if you easily get frustrated by this:

public class MyJavaClassWithHorribleConventions

{ ¬†private int myField; //look at how I’m commenting

}

you’ll have a very rough time reading this book.

As I promised, this is the end of the rant, let’s look at the good things. The book is very accessible, with just enough theory to be able to read it after a long workday. There is very little mathematics involved, only basic algebra. There are lots of pictures showing each step of an algorithm, so you’ll get a pretty clear visual representation of what’s going on. Also, code samples as the title shows are in Java, (of course, on this level of complexity, they could be in almost any reasonable language) so it’s readable for a C# developer as well.

The books covers the big O notation, algorithm time and space analysis, basic data structures, such as arrays, linked lists, stacks, queues. A whole chapter is dedicated to hashing and hashed data structures. There is a chapter on recursion and on different types of trees (binary, AVL, red-black). There’s some coverage on sorting algorithms, but I’d expected more on the subject. The last chapter deals with graphs, and that’s all.

As a summary, as someone who doesn’t have a formal CS background and didn’t really looked up the subject of data structures, I found this book very useful. Although I’m sure I won’t stop here, but it provides a good foundation studying algorithms.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s