Leanpub Header

Skip to main content

Algorithms Step by Step: A Visual Trace Guide

Algorithms Step by Step: A Visual Trace Guide
This book is 100% completeLast updated on 2026-11-05

20 algorithms, 60 worked examples, and visual execution cards showing pseudocode, variable states, and memory diagrams. Downloadable English PDF.

Minimum price

$14.99

$19.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
About

About

About the Book

Understand how algorithms work by following their execution step by step.

Algorithms Step by Step is a visual PDF workbook covering 20 algorithms through 60 worked examples. It connects executed pseudocode lines with concrete values, variable states, and memory diagrams—helping you follow how an algorithm reaches its result.

What’s inside

  • 20 algorithm topics, with three worked examples per topic.
  • Numbered pseudocode connected to execution cards.
  • Evaluated expressions, variable states, and visual memory models.
  • Explanations of what changes between steps.
  • Correctness arguments, efficiency discussions, and common mistakes.
  • Clickable table of contents and PDF bookmarks.

Topics covered

Arrays and searching: Array Sum, Find the Maximum, Linear Search, Binary Search, and Binary Search Tree Search.

Sorting: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quicksort, and Heapsort.

Recursion and graphs: Recursive Factorial, Breadth-First Search, Depth-First Search, and Dijkstra’s Shortest Paths.

Greedy algorithms, dynamic programming, and backtracking: Activity Selection, Memoized Fibonacci, Bottom-Up Fibonacci, 0/1 Knapsack, and Subset Generation.

Who it’s for

Computer science students, self-taught programmers, and learners who want detailed visual walkthroughs of algorithm execution. Basic familiarity with variables, arrays, conditions, and loops is recommended.

What you receive

One downloadable English-language PDF by A.J, containing 2,086 total pages, including 2,081 topic pages.

This is a digital book of explanations and worked examples. Videos, executable software, and downloadable source-code files are not included. A laptop or tablet is recommended for viewing the detailed pages.

AI disclosure

This workbook contains AI-generated content.

For the buyer’s personal study and reference. Redistribution, public uploading, and resale of the PDF are not permitted.

Author

About the Author

Contents

Table of Contents

  1. Array Sum
  2. Find the Maximum
  3. Linear Search
  4. Iterative Binary Search
  5. Bubble Sort with Early Exit
  6. Selection Sort
  7. Insertion Sort
  8. Recursive Factorial
  9. Merge Sort
  10. Quicksort
  11. Iterative Binary Search Tree Search
  12. Heapsort Using a Max-Heap
  13. Breadth-First Search
  14. Recursive Depth-First Search
  15. Dijkstra’s Shortest Paths
  16. Activity Selection
  17. Memoized Fibonacci
  18. Bottom-Up Fibonacci
  19. 0/1 Knapsack
  20. Subset Generation by Backtracking

Get the free Community Edition

You can get the free Community Edition in PDF or EPUB just by sharing your name and email address with the author.

 

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