drawing-graphs

Whenever there is 1 = iterative. 2 = recursive.

Instructions

The goal is not to get the "right" answer, but to understand the problem deeply.

To begin, feel free to start with basics-1

Philosophy

The philosophy of these teachings isn't necessarily to get the "code" correct, but to understand the true nature of the computer.

Computers can do simple work with multiple variables at a very fast pace. The first prerequisite to learning about algorithms is humility.

Humility to recognize that we cannot think the way that computers think, humility to recognize that our "cold" logic will always be surpassed by a single computer.

In the world, humans see multiple variables, colors as red, blue, green, fields of grass, the sand and beach, etc. There are so many things that we can think of at one time, but a computer can only hold 1 thought at a time and at the very core of it, it is either a 0 or a 1. Recognizing this and giving this the respect it deserves is the beginning to the art of computer science.

Goal

The goal is not to be like the computer, but to deeply understand the fundamentals of a computer in an artistic way. Through this journey, we will start with simple exercises that you will be able to do in your sleep, and slowly progress through more complicated problems. In each step, I want you to turn your logical side of the brain off and turn on your creative side. The logical will be replaced by the computer, therefore "cheating", "looking up the answers" is highly highly highly encouraged.

Just as if you were to study the nature of a dog by repeating multiple experiments, you will also need to study the nature of a computer by repeating multiple experiments (in this case, it's copy pasting the answer and running through the debugger). Not only is this necessary, it is going to be the basis of how we learn algorithms.

But your job and the hard work is grabbing a piece of pen and paper, or your ipad and draw the graphs, recursion tree, call stack. It would be useful to think of this as an art class rather than a computer science class.

Laws

Here are the 2 laws to go through recursive problems.

When I ENTER a recursive call : Arrow Left  + Push onto Stack
When I EXIT  / RETURN         : Arrow Right + Pop onto Stack + Add Value