# You could be learning CS 60,000 times faster. Here's how

I recently came across this quote by John Carmack, that "The spinal cord has about the same number of neural connections as the optic nerve — to your brain, all of your body from the neck down is worth about one eye.".

Yet illustrations in Computer Science textbooks seem to be a second-thought at best. In this post, i'll try to convince you that proper illustrations could help you learn 60,000 times faster.*

- results may vary. Terms and conditions apply.

## 90% of information transmitted to the brain is visual

I started looking further into these claims:

- 1 video minute = 1.8 million written words
- 90% of information transmitted to the brain is visual
- Visuals are processed 60,000 times faster than text

Granted, these claims sound bogus, and most likely the result of sloppy research, but the sentiment rings true.

## Learning algorithms visually

in 2020, I decided to get good at FAANG interviews. I started by reading the most common textbooks, learning a lot about time complexity analysis, arrays, stacks, linked lists, hashes, trees, graphs, recursion, dynamic programming, bit manipulation, optimisation, backtracking, depth first searches, breadth first searches, sorting etc.

I started doing Mock interviews on Pramp, and the feedback was good.

I started taking mock interviews on Leetcode.com and landed somewhere between a Facebook and a Google employee. I then sat back and wondered: can the process be easier?

I re-watched the hundreds of animations and algorithm walkthroughs i'd created using my iPad, and suddenly it dawned on me: yes, it can be made a lot easier.

Step 1/ make it visual. There aren't any proper graphics when you have to learn these concepts, or the graphics are at best a second thought, yet the vast majority of the time, just seeing what the algorithm is doing all that's required to understand it, and remember it. What if everything was beautifully animated, and i really mean everything.

Step 2/ Richard Feynman, one of the greatest physicists of our time, had a method for learning. What if the material followed the same principle, and was tested on regular folks first, revised, simplified, and then retargetted for developers.

So i got to work, and started creating content following these two key principles as my mantra. Whether simple pramp array algorithms, pre-order, in-order and post-order tree traversals, depth first searches in matrices, dynamic programming problems explained using simple physical analogies, complex string dynamic programming problems such as computing the Levenshtein distance, explained visually, and clearly, a 2000 year old algorithm for computing primes efficiently, finding the optimal time to buy and sell stocks, or writing a highly efficient algorithm for solving Sudoku.

## A 'hard' problem made easy

Above, we have a 'Hard' leetcode problem: we have free terrain marked as 0s, buildings marked as 1s, and walls marked as 2s. We want to build a new building, which needs to be at the shortest distance from all points.

The solution is to do a BFS from each building, and mark the number of 'steps' the BFS has taken from each building. We then sum up all 3 such values, and the solution is the smallest sum.

By creating this illustration, i was able to explain this problem, and its solution to someone with no CS background. I could have given it a shot without the illustration, but it would have been a strange and fuzzy conversation for them at best.

However, with the illustration, they got it. A CS-illiterate person was able to grasp a BFS, and a solution to a 'hard' question asked in FAANG interviews in under 2 minutes.

## It simply works

I am creating an algorithms course, on pythonical.org, and i invite you to take a look. Pythonical is the missing piece that would have sped up my learning dramatically, by gently introducing me to so many beautiful algorithms in an intuitive manner. I hope you'll find it useful.

## No Comments Yet