# Next book (and tutorial topic): Data Structures and Algorithms

**URL:** https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029
**Category:** programming
**Created:** [January 6, 2023, 6:55am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029 "2023-01-06T06:55:07Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [January 6, 2023, 6:55am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/1 "2023-01-06T06:55:07Z")

</div>

Ok - I think I am 99% close to pulling the trigger on my next collection of tutorials and book:

> [@Thanks for the books](http://forum.kirupa.com/t/thanks-for-the-books/655469/2):
>
> My next book is likely going to be on **Data Structures and Algorithms** , targeted at beginners.

My plan is to target both people who want to learn more deeply about solving various computer problems using fundamental CS concepts as well as those cramming for interviews. Should be an interesting balance 😱

I will share a potential TOC with all of you and gather feedback along the way!

😀

---

<div class="post-metadata">

### Author: ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)
#### Post date: [January 6, 2023, 2:12pm UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/2 "2023-01-06T14:12:31Z")

</div>

Sounds interesting!

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [February 26, 2023, 6:04pm UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/3 "2023-02-26T18:04:44Z")

</div>

And…trigger pulled! 🙂 The plan is to have this done by June 2023. I’m still going back and forth on the TOC, but here is the tentative list:

1. What makes this worth learning? (aka Why should you care?)
2. Data Structures
  1. Arrays
  2. Hash Tables
  3. Set
  4. Linked Lists
  5. Stacks
  6. Queues
  7. Trees (Advanced - may skip)
    1. Binary
    2. Red-Black
    3. AVL

  8. Graphs:
    1. Directed
    2. Undirected

  9. Heaps
  10. Tries

3. Algorithms
  1. Recursion
  2. Memoization
  3. Performance: Speed and Memory Considerations
  4. Searches
    1. Linear Search
    2. Binary Search
    3. Depth-First Search
    4. Breadth-First Search

  5. Sorts
    1. Selection
    2. Insertion
    3. Merge
    4. Bubble
    5. Quick
    6. Counting
    7. Radix
    8. Shell

  6. Shortest Distance (Djikstra) (Advanced - may skip)
  7. A\* (Greedy) (Advanced - may skip)

4. Popular Examples
  1. Towers of Hanoi
  2. Monty Hall Problem
  3. Square Matrix Rotation
  4. Caesar’s Cipher
  5. Rail Fence Cipher
  6. Hamming Distance
  7. Fisher-Yates Shuffle
  8. Best Time to Buy and Sell Stock

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [February 26, 2023, 6:08pm UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/4 "2023-02-26T18:08:36Z")

</div>

If you all have thoughts on topics that I should cover, shouldn’t cover, or any other feedback, let me know! 😛

---

<div class="post-metadata">

### Author: ![Benny\_A\_gmail\_c](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/benny_a_gmail_c/32/20967_2.png) [@Benny\_A\_gmail\_c](https://forum.kirupa.com/u/Benny_A_gmail_c)
#### Post date: [March 1, 2023, 6:39am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/5 "2023-03-01T06:39:06Z")

</div>

I did my computer science degree 26 years ago. I think I heard about [kirupa.com](http://kirupa.com) some 20 years ago the first time. Regardless, I am eager to check DS, like a fresher.

---

<div class="post-metadata">

### Author: ![thoughtsone](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thoughtsone/32/403_2.png) [@thoughtsone](https://forum.kirupa.com/u/thoughtsone)
#### Post date: [March 1, 2023, 7:00am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/6 "2023-03-01T07:00:52Z")

</div>

Looking forward to this! As a long time freelancer (mostly design and front end ui dev) – the need to know pretty much everything else (full-stack dev, linux, mysql, etc) – being able to understand some of the more advanced cs concepts would be very beneficial.

---

<div class="post-metadata">

### Author: ![insats](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/insats/32/9256_2.png) [@insats](https://forum.kirupa.com/u/insats)
#### Post date: [March 19, 2023, 11:32am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/7 "2023-03-19T11:32:44Z")

</div>

I think this is a great idea and I’m looking forward to see the content!

---

<div class="post-metadata">

### Author: ![Ruslan0308c](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ruslan0308c/32/19912_2.png) [@Ruslan0308c](https://forum.kirupa.com/u/Ruslan0308c)
#### Post date: [March 22, 2023, 2:16pm UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/8 "2023-03-22T14:16:51Z")

</div>

I would buy and read with pleasure, but I don’t know English well:(

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [March 22, 2023, 2:22pm UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/9 "2023-03-22T14:22:39Z")

</div>

A lot of the same content will be available on the site and Google Translate can help here 😀

Eventually, an official Russian translation of the book will be available just like it has for the other books 🕶

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [July 18, 2023, 3:59am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/10 "2023-07-18T03:59:16Z")

</div>

And….the book is done! I submitted the final chapters a few moments ago. I will be getting back on the animation tutorials bandwagon shortly after taking a bit of a breather 😛

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [August 22, 2023, 2:38am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/12 "2023-08-22T02:38:59Z")

</div>

The end is near! I’m just a few more weeks away from being done with my latest book 🙂

 ![image](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/f/0/f0cc13ba7bdb481412f72159e18b99d44bcef642.jpeg)

---

<div class="post-metadata">

### Author: ![polaryeti](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/polaryeti/32/19283_2.png) [@polaryeti](https://forum.kirupa.com/u/polaryeti)
#### Post date: [August 26, 2023, 10:26am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/13 "2023-08-26T10:26:52Z")

</div>

🙂 should get 1 free copy lol.🙂

---

<div class="post-metadata">

### Author: ![steve.mills](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/steve.mills/32/14961_2.png) [@steve.mills](https://forum.kirupa.com/u/steve.mills)
#### Post date: [August 31, 2023, 9:21pm UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/14 "2023-08-31T21:21:20Z")

</div>

You do a good job of explaining algorithms 🍻

I was recently doing a job where I have to sort/ filter an obscene amount of data and `Array.sort(callback)` wasn’t cutting it.

I haven’t done `quickSort()` in a fair while and I had to modify the function to take different arguments so I just wanted to copy/modify and then benchmark a sorting function.

I looked around but most examples weren’t simple enough so I jumped on Kirupa, copied your `quickSort() and insertionSort()`, mashed them together ad then benchmarked.

Your quick/insertion sort combo performed 6X faster than the built in Array.sort() in Chrome… 🔥

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [September 1, 2023, 2:33am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/15 "2023-09-01T02:33:58Z")

</div>

That is very surprising, for `Array.sort()` in Chrome uses Quicksort under the covers. More accurately, it is insertion sort for collections with less than some smaller number like 24 or something, but it is Quicksort all the way after that.

Glad my version ended up being faster! 🙂

---

<div class="post-metadata">

### Author: ![steve.mills](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/steve.mills/32/14961_2.png) [@steve.mills](https://forum.kirupa.com/u/steve.mills)
#### Post date: [September 1, 2023, 2:55am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/16 "2023-09-01T02:55:33Z")

</div>

It must be the callback function.  
I cant get around it because I’m sorting numbers and strings that may have upperCase. 😅  
I’m also using an array of objects and comparing props so IDK…

---

<div class="post-metadata">

### Author: ![steve.mills](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/steve.mills/32/14961_2.png) [@steve.mills](https://forum.kirupa.com/u/steve.mills)
#### Post date: [September 1, 2023, 3:35am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/17 "2023-09-01T03:35:49Z")

</div>

Its going faster now… 😀  
I had the array size for `insertionSort()` set to 10.  
I tried 60 like `TimSort()` but that was rubbish… 24 is the sweet spot…

---

<div class="post-metadata">

### Author: ![Abdulah\_qurashii](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Abdulah\_qurashii](https://forum.kirupa.com/u/Abdulah_qurashii)
#### Post date: [September 30, 2023, 12:48pm UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/19 "2023-09-30T12:48:35Z")

</div>

Yes! I am doing data science

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [January 15, 2024, 3:19am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/22 "2024-01-15T03:19:18Z")

</div>

Well, time sure flies! The new book is now out 🙂

You can see more details about it here:

[https://twitter.com/kirupa/status/1746714410218070122](https://twitter.com/kirupa/status/1746714410218070122)

I’m also adding videos on each topic to both my YouTube channel and my newly created Tiktok channel to see how that will change how this book is marketed! ⚡

---

<div class="post-metadata">

### Author: ![viratsachool](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/viratsachool/32/25383_2.png) [@viratsachool](https://forum.kirupa.com/u/viratsachool)
#### Post date: [January 24, 2024, 10:26am UTC](https://forum.kirupa.com/t/next-book-and-tutorial-topic-data-structures-and-algorithms/656029/23 "2024-01-24T10:26:52Z")

</div>

Anticipating this with great anticipation! As a seasoned freelancer specializing in design and front-end user interface development, I need to know pretty much everything else (full-stack dev, linux, mysql, etc.). Knowing some of the more complex ideas in computer science would be very helpful.  
Thanks
