🔥 Burn Fat Fast. Discover How! 💪

Data structures IRL In computer science, a data structure (Wi | Professor M

Data structures IRL

In computer science, a data structure (Wiki page) is a data organization, management, and storage format that enables efficient access and modification. Arrays, lists, tuples, sets, graphs, and trees are just some of the possible data structures in a coder’s toolbox.

A golfer chooses a club depending, among other reasons, on their lie (i.e., the position of a ball) and the desired distance to cover. Coders similarly pick a data structure to match the objective at hand.

The data structure I’ve selected for this entry is a queue—a collection of entities that are maintained in a sequence and can be modified by the addition of entities at one end of the sequence and the removal of entities from the other end of the sequence (Wiki page).

My favorite part of a queue as a data structure is that it predates computer science by thousands and thousands of years.

First-come-first-served is achievable even without an optimal data structure, but only for small groups of people who care about their reputations. After all, it’s easy to remember who was there before you and who came later.

But when the number of people in a group increases, relying on an inappropriate data structure to maintain order creates a prohibitively high cognitive load. What’s the solution?

Well, let’s line up and not move. That way, our physical placement would carry information previously stored in our brains. With this cognitive load freed up, our brains are now free to engage in other pursuits. And these other pursuits will eventually lead to the invention of computer science.