small medium large xlarge

A Common-Sense Guide to Data Structures and Algorithms, Second Edition: Level Up Your Core Programming Skills

by

Cover image for A Common-Sense Guide to Data Structures and Algorithms, Second Edition

A Common-Sense Guide to Data Structures and Algorithms, Second Edition

Level Up Your Core Programming Skills

by

If you thought that data structures and algorithms were all just theory, you’re missing out on what they can do for your code. Learn to use Big O Notation to make your code run faster by orders of magnitude. Choose from data structures such as hash tables, trees, and graphs to increase your code’s efficiency exponentially. With simple language and clear diagrams, this book makes this complex topic accessible, no matter your background. This new edition features practice exercises in every chapter, and new chapters on topics such as dynamic programming and heaps and tries. Get the hands-on info you need to master data structures and algorithms for your day-to-day work.

Choose Your Format(s)

  • $24.95 In Stock
    • Beta: What do I get?

  • Ebooks are DRM free.

  • Ebook delivery options.

  • The Paper Book will ship on 2020-06-10 (roughly).

About this Title

Skill-meter-1-4
Pages: 250 (est)
Published: 2020-06-10
Release: B2.0 (2019-11-26)
ISBN: 978-1-68050-722-5

Algorithms and data structures are much more than abstract concepts. Mastering them enables you to write code that runs faster and more efficiently, which is particularly important for today’s web and mobile apps. Take a practical approach to data structures and algorithms, with techniques and real-world scenarios that you can use in your daily production code, with examples in JavaScript, Python, and Ruby. This new and revised second edition features new chapters on recursion, dynamic programming, and using Big O in your daily work.

Use Big O notation to measure and articulate the efficiency of your code, and modify your algorithm to make it faster. Find out how your choice of arrays, linked lists, and hash tables can dramatically affect the code you write. Use recursion to solve tricky problems and create algorithms that run exponentially faster than the alternatives. Dig into advanced data structures such as binary trees and graphs to help scale specialized applications such as social networks and mapping software. You’ll even encounter a single keyword that can give your code a turbo boost. Practice your new skills with exercises in every chapter, along with detailed solutions.

Use these techniques today to make your code faster and more scalable.

What You Need

No requirements

Contents & Extracts

This book is currently in beta, so the contents and extracts will change as the book is developed.

  • Preface
    • Who Is This Book For?
    • What’s New in the Second Edition
    • What’s in This Book?
    • How to Read This Book
    • Online Resources
    • Acknowledgments
  • Why Data Structures Matter excerpt
    • The Array: The Foundational Data Structure
    • Reading
    • Searching
    • Insertion
    • Deletion
    • Sets: How a Single Rule Can Affect Efficiency
    • Wrapping Up
    • Exercises
  • Why Algorithms Matter
    • Ordered Arrays
    • Searching an Ordered Array
    • Binary Search
    • Binary Search vs. Linear Search
    • Pop Quiz
    • Wrapping Up
    • Exercises
  • Oh Yes! Big O Notation
    • Big O: How Many Steps Relative to N Elements?
    • The Soul of Big O
    • Same Algorithm, Different Scenarios
    • An Algorithm of the Third Kind
    • Logarithms
    • O(log N) Explained
    • Practical Examples
    • Wrapping Up
    • Exercises
  • Speeding Up Your Code with Big O
    • Bubble Sort excerpt
    • Bubble Sort in Action
    • Bubble Sort Implemented
    • The Efficiency of Bubble Sort
    • A Quadratic Problem
    • A Linear Solution
    • Wrapping Up
    • Exercises
  • Optimizing Code with and Without Big O
    • Selection Sort
    • Selection Sort in Action
    • Selection Sort Implemented
    • The Efficiency of Selection Sort
    • Ignoring Constants
    • The Big O Categories
    • A Practical Example
    • Wrapping Up
    • Exercises
  • Optimizing for Optimistic Scenarios
    • Insertion Sort
    • Insertion Sort in Action
    • Insertion Sort Implemented
    • The Efficiency of Insertion Sort
    • The Average Case
    • A Practical Example
    • Wrapping Up
    • Exercises
  • Big O in Everyday Code excerpt
    • Mean Average of Even Numbers
    • Word Builder
    • Array Sample
    • Average Celsius Reading
    • Clothing Labels
    • Palindrome Checker
    • Get All the Products
    • Password Cracker
    • Wrapping Up
    • Exercises
  • Blazing Fast Lookup with Hash Tables
    • Enter the Hash Table
    • Hashing with Hash Functions
    • Building a Thesaurus for Fun and Profit, but Mainly Profit
    • Dealing with Collisions
    • An Even Spread
    • The Great Balancing Act
    • Hash Tables for Organization
    • Hash Tables for Speed
    • Wrapping Up
    • Exercises
  • Crafting Elegant Code with Stacks and Queues
    • Stacks
    • Abstract Data Types
    • Stacks in Action
    • Queues
    • Queue Implementation
    • Queues in Action
    • Wrapping Up
    • Exercises
  • Recursively Recurse with Recursion
    • Recurse Instead of Loop
    • The Base Case
    • Reading Recursive Code
    • Recursion in the Eyes of the Computer
    • Recursion in Action
    • Wrapping Up
    • Exercises
  • Learning to Write in Recursive
    • Recursive Category: Repeatedly Execute
    • Recursive Trick: Passing Extra Parameters
    • Recursive Category: Calculations
    • Two Approaches to Calculations
    • Top-Down Recursion: A New Way of Thinking
    • Beautiful Recursive Problems
    • Anagrams
    • Wrapping Up
    • Exercises
  • Dynamic Programming
    • Unnecessary Recursive Calls
    • The Little Fix for Big O
    • Overlapping Subproblems
    • Dynamic Programming Through Memoization
    • Dynamic Programming Through Going Bottom Up
    • Wrapping Up
    • Exercises
  • Recursive Algorithms for Speed
    • Partitioning
    • Quicksort
    • The Efficiency of Quicksort
    • Worst-Case Scenario
    • Quickselect
    • Sorting as a Key to Other Algorithms
    • Wrapping Up
    • Exercises
  • Node-Based Data Structures
    • Linked Lists
    • Implementing a Linked List
    • Reading
    • Searching
    • Insertion
    • Deletion
    • Linked Lists in Action
    • Doubly Linked Lists
    • Wrapping Up
  • Speeding Up All the Things with Binary Trees
    • Binary Trees
    • Searching
    • Insertion
    • Deletion
    • Binary Trees in Action
    • Wrapping Up
  • Heaps and Tries
  • Connecting Everything with Graphs
    • Graphs
    • Breadth-First Search
    • Graph Databases
    • Weighted Graphs
    • Dijkstra’s Algorithm
    • Wrapping Up
  • Dealing with Space Constraints
    • Big O Notation as Applied to Space Complexity
    • Trade-Offs Between Time and Space
    • Parting Thoughts
  • Tips for Code Optimization
  • Exercise Solutions
    • Chapter 1
    • Chapter 2
    • Chapter 3
    • Chapter 4
    • Chapter 5
    • Chapter 6
    • Chapter 7
    • Chapter 8
    • Chapter 9
    • Chapter 10

Author

Jay Wengrow is an experienced educator and developer who is dedicated to teaching the world to code. He is the founder and CEO of Actualize, a national coding bootcamp and apprenticeship; and Anyone Can Learn To Code, an educational company teaching everyone to code through online tutorials, K-12 computer science curriculum, and corporate training.