# A Common-Sense Guide to Data Structures and Algorithms in Python, Volume 1 (PragProg)

**URL:** <https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129>\
**Category:** General Learning Resources\
**Tags:** book-a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1, published-book, pragprog, python\
**Created:** [3 July 2023 16:53 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129 "2023-07-03T16:53:35Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![PragmaticBookshelf](https://forum.devtalk.com/user_avatar/forum.devtalk.com/pragmaticbookshelf/32/463_2.png) [@PragmaticBookshelf](https://forum.devtalk.com/u/PragmaticBookshelf)\
**Post date:** [3 July 2023 16:53 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/1 "2023-07-03T16:53:36Z")

</div>

Big O Notation can make your code faster by orders of magnitude. Get the hands-on info you need to master data structures and algorithms for your daily work. 

 ![jwpython-500](https://forum.devtalk.com/uploads/default/original/2X/3/34a972f04be0a7b2f8ccc30ed51e3fe64532af44.jpeg)

### Jay Wengrow @jaywengrow

_edited by Katharine Dvorak @katied_

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 runs equivalently in both Python versions 2 and 3.

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.

* * *

**Jay Wengrow** is an experienced educator and software engineer. He is the founder of Actualize, an award-winning US coding bootcamp that has helped hundreds of people from all backgrounds launch their careers as software engineers. He is passionate about making software development more accessible by breaking the complex down into its simpler, easier parts.

* * *

- Full details: [A Common-Sense Guide to Data Structures and Algorithms in Python, Volume 1: Level Up Your Core Programming Skills by Jay Wengrow](https://pragprog.com/titles/jwpython/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1/)
- View this book’s portal and details on how to post errata and suggestions [here](https://devtalk.com/books/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1).

_Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “ **devtalk.com**" at checkout 👍_

---

<div class="post-metadata">

**Author:** ![mafinar](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mafinar/32/723_2.png) [@mafinar](https://forum.devtalk.com/u/mafinar)\
**Post date:** [3 July 2023 20:54 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/2 "2023-07-03T20:54:59Z")

</div>

Multi volume? Interesting! I wonder what volume 2 would include 🤔

---

<div class="post-metadata">

**Author:** ![iPaul](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/i/7feea3/32.png) [@iPaul](https://forum.devtalk.com/u/iPaul)\
**Post date:** [4 July 2023 02:46 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/3 "2023-07-04T02:46:33Z")

</div>

Why keep compatibility with Python 2 when the language is EOL ? Wouldn’t better to use modern idiomatic Python 3 code ?

The content of the first volume is similar with the 2nd edition of the book (which I own). What would volume 2 be about ?

---

<div class="post-metadata">

**Author:** ![jss](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@jss](https://forum.devtalk.com/u/jss)\
**Post date:** [4 July 2023 19:40 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/4 "2023-07-04T19:40:27Z")

</div>

I agree. I hope the author would just use Python 3.

---

<div class="post-metadata">

**Author:** ![jaywengrow](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jaywengrow/32/527_2.png) [@jaywengrow](https://forum.devtalk.com/u/jaywengrow)\
**Post date:** [5 July 2023 20:05 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/5 "2023-07-05T20:05:16Z")

</div>

Hello! Author here - thanks for your interest in the book!

Very good point regarding Python 3 - I think I need to reword the sentence about Python 2 versus 3. The main point was actually to indicate that the book is now compatible with Python 3. However, it just so happens to also still be compatible with Python 2, since the code is simple enough that it didn’t need to rely on idioms unique to Python 3. I hope that makes sense. But we’ll try to reword based on your suggestion.

With regard to Volume 2 - it’s an exciting new project I’m working on now, and hope to have out next year some time. It continues from where Volume 1 leaves off, and introduces the reader to additional concepts of DSA that build upon the knowledge of Volume 1. Topics include (but are not limited to - and also subject to change):

- Mergesort
- Benchmarking
- Randomization Algorithms
- Caching (plus LRU Cache)
- Red-Black Trees
- Treaps
- Approximation Algorithms
- Bloom Filters
- Dealing with NP-Complete problems
- B-Trees
- Minimum Spanning Trees
- Topological Sort
- Bipartite Matching
- Parallel Algorithms

I hope that helps!  
-Jay

---

<div class="post-metadata">

**Author:** ![jaywengrow](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jaywengrow/32/527_2.png) [@jaywengrow](https://forum.devtalk.com/u/jaywengrow)\
**Post date:** [5 July 2023 20:05 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/6 "2023-07-05T20:05:51Z")

</div>

Thanks for your interest in the book!

With regard to Volume 2 - it’s an exciting new project I’m working on now, and hope to have out next year some time. It continues from where Volume 1 leaves off, and introduces the reader to additional concepts of DSA that build upon the knowledge of Volume 1. Topics include (but are not limited to - and also subject to change):

- Mergesort
- Benchmarking
- Randomization Algorithms
- Caching (plus LRU Cache)
- Red-Black Trees
- Treaps
- Approximation Algorithms
- Bloom Filters
- Dealing with NP-Complete problems
- B-Trees
- Minimum Spanning Trees
- Topological Sort
- Bipartite Matching
- Parallel Algorithms

I hope that helps!  
-Jay

---

<div class="post-metadata">

**Author:** ![mafinar](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mafinar/32/723_2.png) [@mafinar](https://forum.devtalk.com/u/mafinar)\
**Post date:** [5 July 2023 21:03 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/7 "2023-07-05T21:03:20Z")

</div>

Wow that is quite a plan. I am buying both the volumes and will be suggesting folks too. There are so few algorithm books dedicated to Python that doesn’t sound too text bookish. And something that potentially covers slightly advanced ones is definitely worth being on my bookshelf 🙂

---

<div class="post-metadata">

**Author:** ![SourceNode](https://forum.devtalk.com/user_avatar/forum.devtalk.com/sourcenode/32/4186_2.png) [@SourceNode](https://forum.devtalk.com/u/SourceNode)\
**Post date:** [20 July 2023 22:42 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/8 "2023-07-20T22:42:39Z")

</div>

From the pragprog site, I read this from the book’s Preface:

> I set out to create new single-language versions of A Common-  
> Sense Guide to Data Structures and Algorithms. The first of these is the Python  
> version, and is what you’re reading now!

What other single-language versions of this books two volumes are planned?

---

<div class="post-metadata">

**Author:** ![jaywengrow](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jaywengrow/32/527_2.png) [@jaywengrow](https://forum.devtalk.com/u/jaywengrow)\
**Post date:** [20 July 2023 23:12 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/9 "2023-07-20T23:12:20Z")

</div>

Hi! The plan is to put out editions in JavaScript and Java.

---

<div class="post-metadata">

**Author:** ![mercyf](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mercyf/32/6657_2.png) [@mercyf](https://forum.devtalk.com/u/mercyf)\
**Post date:** [21 July 2023 09:42 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/10 "2023-07-21T09:42:11Z")

</div>

Awesome. Excited for both volumes of the book. 🙂

---

<div class="post-metadata">

**Author:** ![andrea](https://forum.devtalk.com/user_avatar/forum.devtalk.com/andrea/32/6677_2.png) [@andrea](https://forum.devtalk.com/u/andrea)\
**Post date:** [6 October 2023 23:58 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/11 "2023-10-06T23:58:14Z")

</div>

Can’t wait for Volume 2 🙂

---

<div class="post-metadata">

**Author:** ![onyx-and-iris](https://forum.devtalk.com/user_avatar/forum.devtalk.com/onyx-and-iris/32/5284_2.png) [@onyx-and-iris](https://forum.devtalk.com/u/onyx-and-iris)\
**Post date:** [29 January 2024 15:52 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-in-python-volume-1-pragprog/115129/12 "2024-01-29T15:52:29Z")

</div>

I’m currently half way through Volume 1 so will definitely be grabbing Volume 2 when it’s released!
