Data Structure: Trees and Depth-First Tree Traversals in JavaScript

What is a tree?

Trees are a commonly-used data structure in web development. You interact with a very common example of a tree every time you use your browser, likely without knowing it — the Document Object Model (DOM).

DOM tree
Source: w3schools

Continue reading Data Structure: Trees and Depth-First Tree Traversals in JavaScript

Quicksort

Quicksort is a sorting algorithm, used to place the elements of an array into an order. That order is based on comparison —  the things being sorted must have a “less than” / “greater than” relationship. (Source).

Continue reading Quicksort

Recursion

Oh, recursion.

There are two types of people, those who understand recursion and those who understand that there are two types of people in the world… (r/ProgrammerHumor)

But really. There seem to be people who can very naturally digest the concept of recursion, and those whose brains absolutely reject it. I happened to be one of the latter. In this post, we’ll go over recursion generally, and then work through a diagrammed problem example.

Continue reading Recursion