Leanpub Header

Skip to main content

The Data Structures Notebook

The Data Structures Notebook
This book is 100% completeLast updated on 2026-11-11

Written notes on one textbook, kept chapter by chapter, that grew into a book: one drawing, one walk, and a check, from an examination schedule to hash tables.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
About

About

About the Book

Early in my career I was handed one textbook: Evangel Quiwa's Data Structures. It is the only book on the subject I ever took seriously. I studied it chapter by chapter and kept written notes, one session of his to one set of mine. The book, and later these notes, got me through technical interviews in the United States and in the Netherlands.

One idea holds these notes together: a program gets long when the steps have to hunt for the data. It stays short when the data already sits where the steps expect it. So there are two jobs: decide how the data sits in memory, then write the steps that use it.

Fifteen sessions follow that idea through stacks, queues, trees, heaps, graphs, shortest paths, linked lists, searching, binary search trees, and hash tables. Each session starts from a drawing, walks it with real numbers, and ends with a check you can do on paper. Every step is written in Python, with 35 diagrams and 22 programs you can run.

What you'll learn

  • Tell a data type, an abstract data type, and a data structure apart
  • Read and run Easy, the teaching notation, and write the same step in Python
  • Count a procedure with the bounds that matter, and read O and Theta without mixing them
  • Build a stack, a queue, and a deque, and use them for brackets, postfix, and a topological sort
  • Walk a binary tree four ways, and without a stack three more: threads, link inversion, and exclusive-or links
  • Keep a heap, a forest, and a set of equivalence classes, and say what each operation costs
  • Walk a graph depth-first and breadth-first, and use the walks for cycles, components, and articulation points
  • Find a cheapest spanning tree and a shortest path, and know when each algorithm applies
  • Store a sequence four ways, then use the chain for a polynomial, a long integer, a memory pool, and a qualifying list
  • Search a static table, a binary search tree, and a hash table, and say what each collision policy costs

Author

About the Author

Joel Bryan Juliano

Hi, I'm Joel.

I am Dutch-Filipino Software Engineer with 20+ years of experience.

And with over 20 years in the game, I’ve seen it all and loved every minute of it.

My journey has taken me through a variety of industries, from sports streaming to cybersecurity, both in the private sector and for the Dutch government, and everything in between.

Along the way, I’ve picked up a diverse set of skills and experiences, in which I document into books.

Contents

Table of Contents

Preface

Two Jobs

Session 1. Basic Concepts

  1. 1.1 How do we solve a problem on a computer?
  2. 1.2 What is a data structure?
  3. 1.3 What is an algorithm?
  4. 1.4 Implementing ADTs
  5. 1.5 Formulating a solution to the exam schedule
  6. Summary
  7. Exercises
  8. Bibliographic notes

Session 2. Mathematical Preliminaries

  1. 2.1 Mathematical notations and elementary functions
  2. 2.2 Sets
  3. 2.3 Relations
  4. 2.4 Permutations and Combinations
  5. 2.5 Summations
  6. 2.6 Recurrences
  7. 2.7 Methods of proof
  8. Summary
  9. Exercises
  10. Bibliographic notes

Session 3. Algorithms

  1. 3.1 Communicating an algorithm
  2. 3.2 Analyzing an algorithm
  3. Summary
  4. Exercises
  5. Bibliographic notes

Session 4. Stacks

  1. 4.1 Sequential implementation of a stack
  2. 4.2 Linked list implementation of a stack
  3. 4.3 Applications of stacks
  4. 4.4 Sequential implementation of multiple stacks
  5. Summary
  6. Exercises
  7. Bibliographic notes

Session 5. Queues and Deques

  1. 5.1 Sequential implementation of a straight queue
  2. 5.2 Sequential implementation of a circular queue
  3. 5.3 Linked list implementation of a queue
  4. 5.4 Application of queues: topological sorting
  5. 5.5 The deque as an abstract data type
  6. 5.6 Sequential implementation of a straight deque
  7. 5.7 Sequential implementation of a circular deque
  8. 5.8 Linked list implementation of a deque
  9. Summary
  10. Exercises
  11. Bibliographic notes

Session 6. Binary Trees

  1. 6.1 Definitions and related concepts
  2. 6.2 Binary tree traversals
  3. 6.3 Binary tree representation in computer memory
  4. 6.4 Implementing the traversal algorithms
  5. 6.5 Threaded binary trees
  6. 6.6 Traversal by link inversion
  7. 6.7 Siklóssy traversal
  8. Summary
  9. Exercises
  10. Bibliographic notes

Session 7. Applications of Binary Trees

  1. 7.1 Calculating conveyance losses in an irrigation network
  2. 7.2 Heaps and the heapsort algorithm
  3. 7.3 Priority queues
  4. Summary
  5. Exercises
  6. Bibliographic notes

Session 8. Trees and Forests

  1. 8.1 Definitions and related concepts
  2. 8.2 Natural correspondence
  3. 8.3 Forest traversal
  4. 8.4 Linked representation for trees and forests
  5. 8.5 Sequential representation for trees and forests
  6. 8.6 Trees and the equivalence problem
  7. Summary
  8. Exercises
  9. Bibliographic notes

Session 9. Graphs

  1. 9.1 Some pertinent definitions and related concepts
  2. 9.2 Representation of graphs
  3. 9.3 Graph traversals
  4. 9.4 Some classical applications of DFS and BFS
  5. Summary
  6. Exercises
  7. Bibliographic notes

Session 10. Applications of Graphs

  1. 10.1 Minimum-cost spanning trees for undirected graphs
  2. 10.2 Shortest path problems for directed graphs
  3. Summary
  4. Exercises
  5. Bibliographic notes

Session 11. Linear Lists

  1. 11.1 Linear lists
  2. 11.2 Sequential representation of linear lists
  3. 11.3 Linked representation of linear lists
  4. 11.4 Linear lists and polynomial arithmetic
  5. 11.5 Linear lists and multiple-precision integer arithmetic
  6. 11.6 Linear lists and dynamic storage management
  7. 11.7 Linear lists and qualifying lists
  8. Summary
  9. Exercises
  10. Bibliographic notes

Session 12. Generalized Lists

  1. 12.1 Definitions and related concepts
  2. 12.2 Representing generalized lists in computer memory
  3. 12.3 Implementing some basic operations on generalized lists
  4. 12.4 Traversing pure lists
  5. 12.5 Automatic storage reclamation
  6. Summary
  7. Exercises
  8. Bibliographic notes

Session 13. Sequential Tables

  1. 13.1 The table ADT
  2. 13.2 Direct-address table
  3. 13.3 Static sequential tables
  4. Summary
  5. Exercises
  6. Bibliographic notes

Session 14. Binary Search Trees

  1. 14.1 Binary search trees
  2. 14.2 Height-balanced binary search trees
  3. 14.3 Rotations on AVL trees
  4. 14.4 Optimum binary search trees
  5. Summary
  6. Exercises
  7. Bibliographic notes

Session 15. Hash Tables

  1. 15.1 Converting keys to numbers
  2. 15.2 Choosing a hash function
  3. 15.3 Collision resolution by chaining
  4. 15.4 Collision resolution by open addressing
  5. Summary
  6. Exercises
  7. The two jobs
  8. Bibliographic notes

Public Examples

  1. Open books
  2. Session 1
  3. Session 2
  4. Session 3
  5. Session 4
  6. Session 5
  7. Session 6
  8. Session 7
  9. Session 8
  10. Session 9
  11. Session 10
  12. Session 11
  13. Session 12
  14. Session 13
  15. Session 14
  16. Session 15

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub