Wednesday, February 22, 2017

10 Programming Data Structures and Algorithms - in Pictures

I've been studying

...I know, doesn't sound that interesting, right? Well, I noticed that, while studying, I started drawing "icons" to remind myself how each concept works---and to do so quickly

(Plus, I just find sketches more interesting to look at than text anyways.)

There are a lot of data structures and algorithms out there, some of which I just need to brush up on, others are entirely new to me. It's easy to lose track of the important details when there's a lot to catch up on.

I personally find it much easier to quickly scan a visual than to read the same thing in text. So with my "icons", I don't have to re-read the walls of text in my notes (and potentially forget details when I need to code on the spot). Maybe you might find these pictures helpful for review, or as a starting point.

The idea is similar to the visual memory-aids I made for an earlier post on learning more efficiently. Deeply learning and connecting concepts can help make memories more robust.

As a final thought, you might find it helpful to also use the method of loci, to keep track of all the concepts under one roof in your mind (with some branching to group details together to each concept). 

For example, my living room couch is my "location" for the hash table. From there it's easy to visualize the insert, delete, search, and rehash functions---using the pillows. Different parts of that couch also serve as reminders of member variables, etc.


Not actually my couch(es). Image from Wikipedia.

Now, without further ado, here are "icons" that serve as visual summaries for ten computer science concepts. Enjoy! 

Search Algorithms:

 

#1. Interpolation Search:

 

#2. Binary Search:


-------
-------
-------

Sorting Algorithms:

 

#3. Insertion Sort:

 

#4. Shell Sort:

 

#5. Quick Sort:

 

#6. Merge Sort:


-------
-------
-------

Data Structures:


-------

Stack:

#7. Stack - Array Implementation:

 

#8. Stack - Linked List Implementation:


-------
 

Queue:

 

#9. Queue - Array Implementation: 

 

#10. Queue - Linked List Implementation:

_________________________

LINKS TO OTHER STUFF: 


Chinese Learning Projects:
 - Book
 - HSK 1
 - HSK 5