dhruv's wiki
T

# A Common-Sense Guide to Data Structures and Algorithms

## Chapter Checklist

1. Why Data Structures Matter
• The Array: The Foundational Data Structure
• Reading
• Searching
• Insertion
• Deletion
• Sets: How a Single Rule Can Affect Efficiency
• Wrapping Up
1. Why Algorithms Matter
• Ordered Arrays
• Searching an Ordered Array
• Binary Search
• Binary Search vs. Linear Search
• Wrapping Up
1. Oh Yes! Big O Notation
• Big O: Count the Steps
• Constant Time vs. Linear Time
• Same Algorithm, Different Scenarios
• An Algorithm of the Third Kind
• Logarithms
• O(log N) Explained
• Practical Examples
• Wrapping Up
1. Speeding Up Your Code with Big O
• Bubble Sort
• Bubble Sort in Action
• Bubble Sort Implemented
• The Efficiency of Bubble Sort
• A Quadratic Problem
• A Linear Solution
• Wrapping Up
1. Optimizing Code with and Without Big O
• Selection Sort
• Selection Sort in Action
• Selection Sort Implemented
• The Efficiency of Selection Sort
• Ignoring Constants
• The Role of Big O
• A Practical Example
• Wrapping Up
1. 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
1. 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
• The Great Balancing Act
• Practical Examples
• Wrapping Up
1. Crafting Elegant Code with Stacks and Queues
• Stacks
• Stacks in Action
• Queues
• Queues in Action
• Wrapping Up
1. 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
1. Recursive Algorithms for Speed
• Partitioning
• Quicksort
• The Efficiency of Quicksort
• Worst-Case Scenario
• Quickselect
• Wrapping Up
1. Node-Based Data Structures
• Linked Lists
• Implementing a Linked List
• Reading
• Searching
• Insertion
• Deletion
• Linked Lists in Action
• Doubly Linked Lists
• Wrapping Up
1. Speeding Up All the Things with Binary Trees
• Binary Trees
• Searching
• Insertion
• Deletion
• Binary Trees in Action
• Wrapping Up
1. Connecting Everything with Graphs
• Graphs
• Breadth-First Search
• Graph Databases
• Weighted Graphs
• Dijkstraâ€™s Algorithm
• Wrapping Up
1. Dealing with Space Constraints
• Big O Notation as Applied to Space Complexity
• Trade-Offs Between Time and Space
• Parting Thoughts