A Common-Sense Guide to Data Structures and Algorithms in Python, Volume 1: Level Up Your Core Programming Skills
By Jay Wengrow
Language: English
Category: Ebook - Computer/Internet
Categories: Computer/Internet
Uploader: draino
Uploaded At: 2024-06-13 02:20:26
Pragmatic Bookshelf; 2023, Python Programming, Algorithms & Data Structures
Description
If you thought data structures and algorithms were all just theory, you’re missing out on what they can do for your Python 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. Every chapter features practice exercises to give you the hands-on information you need to master data structures and algorithms for your day-to-day work.
This new edition uses Python exclusively as its language for all code implementations, in both the main text as well as the exercises and solutions. Python has its own unique set of capabilities and constraints, so all the algorithms have been optimized for use in Python. Additionally, all Python code now follows the PEP 8 style guide and Python 3 (in addition to Python 2).
Reader’s Note: This material is also covered in A Common-Sense Guide to Data Structures and Algorithms, Second Edition. If you already own that title, the significant advantage to this version is that it rewrites all code and explanations to be specific to Python.
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. The Python edition uses Python exclusively for all code examples, exercise, and solutions.
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 Python code faster and more scalable.
Contents
- Why Data Structures Matter
- Why Algorithms Matter excerpt
- O Yes! Big O Notation excerpt
- Speeding Up Your Code with Big O
- Optimizing Code With and Without Big O
- Optimizing for Optimistic Scenarios
- Big O in Everyday Code
- Blazing Fast Lookup with Hash Tables
- Crafting Elegant Code with Stacks and Queues
- Recursively Recurse with Recursion
- Learning to Write in Recursive excerpt
- Dynamic Programming
- Recursive Algorithms for Speed
- Node-Based Data Structures
- Speeding Up All the Things with Binary Search Trees
- Keeping Your Priorities Straight with Heaps
- It Doesn’t Hurt to Trie
- Connecting Everything with Graphs
- Dealing with Space Constraints
- Techniques for Code Optimization