Before I get into this specific design pattern, I’d like to talk a bit about what a design pattern is and why it is important as a programmer. Let’s get started!

Design Pattern

When I first began learning to code, I never really thought about things such as design patterns and algorithms. I just focused on learning the syntax and solving simple coding problems, overall I was just excited to be learning a new skill! But… as I progressed, I soon realized that design patterns and solving algorithms are probably two of the most important things a professional software engineer needs to…

In my last article, I chose to dive in to the “Divide and Conquer” algorithmic paradigm, and what I found was quite interesting!

For one, I realized the importance of being able to sort arrays in programming. It is a common task you will find yourself attempting to complete. As I explained in my last article, there are built in functions for sorting in many programming languages, such as sort() in JavaScript, but as programmers we don’t always want to choose the easy way, we want to know how it’s done!

Another thing I realized when learning about Divide and…

Often times in programming you‘ve got an array that is out of order, and values are just thrown in there because you know they’re important. Well, now I’d like to display those array values in a specific order. How might we do that?

Everyone who has ever shopped online has seen a list of products in front of them. Everyone has also seen that “Filter” button at the top of the screen as well! That filter button is a way to sort out the list of products you see in front of you, whether it be excluding certain categories of…

As a programmer, you’ll consistently encounter a problem such as this…

“Hey, remember that array that you’ve been storing tons of important values in? Great! Well… now I need you to find X, and make sure you find it as fast as possible!”

This is the exact reason why learning search algorithms as a programmer is important! You’ll never know when you need to search through your array so if you ever encounter a problem such as this, you’ll know what to do.

Let’s tackle a simple search algorithm together:

“I want you to find the number 99 in this…

In my last article on Breadth-First Search and Depth-First Search I explained both types of graph traversal and talked a bit about the pros and cons of each. In this article, I will focus on how we can implement each type of algorithm using JavaScript!

First, lets quickly reiterate what was explained in the last article.

Breadth-First Search(BFS)

A graph traversal algorithm that traverses the graph one level at a time. It visits all the children of the parent, then visits all the grandchildren, and so on.


Depth-First Search(DFS)

A graph traversal algorithm that visits the first child node of the parent, then goes…

As I continue in my software engineering journey, the importance of understanding algorithms is becoming more and more relevant. Employers want to know that you don’t just memorize code, but you understand the fundamentals of best coding practices.

Graph traversal is a common scenario you will encounter when dealing with large groups of data. A graph is a non-linear data structure that contains nodes and edges. A node(aka vertex) is a single unique value in a graph, while an edge represents a relationship between these two nodes.

Think of a social media app. A user is a node and when…

Elijah Wines

Software Engineer - JavaScript, Ruby, React, Ruby on Rails

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store