Introduction

Welcome! Data structures and algorithms are fundamental building blocks in computer science. This manual explores a variety of data structures and algorithms with code implementations in Java.

Motivation

I put this manual together for a few reasons.

First, I wanted to have a collection of clear explanations of core data structures and algorithms, along with their implementations, that can be shared with other software engineers, members of the tech community and anyone who's just generally interested.

Second, I find that explaining things I think I know deepens my understanding of them. That's certainly the case for this manual.

Finally, the hope is that the manual can serve as a helpful reference for those preparing for technical interviews.

Who is this for?

The manual is structured in such a way that anybody with high school-level mathematics knowledge, particularly of simple algebra, should be able to follow along. No background in advanced computer science is required, but just an interest in learning about or refreshing your knowledge of data structures and algorithms.

Since code implementations are in Java, it's recommended that readers have at least a basic understanding of the fundamentals of the Java programming language, including syntax, generics and writing programs using object-oriented programming. A good book to start with is Head First Java.

How to use the manual

As the title suggests, the manual is broken down into two main sections: Data structures and Algorithms. Data structures gives an introduction to techniques which are used to store data and Algorithms introduces various procedures for solving computational problems, using data structures.

In most cases, you should be able to jump around and read specific sections out of order, but reading the manual like you would a story also makes sense.

Whoever you are, I hope you enjoy the manual and come away with a deeper understanding and appreciation of data structures and algorithms.

Before we dive into those, there's a brief primer on computational complexity, which is used to analyse the efficiency of various algorithms and operations on data structures. That's up next.