Photo by Silvan Arnet on Unsplash

A common interview question for mid-level and higher-level engineers is to determine if a combination from a list of numbers can be summed up to a specified target.

In this problem, we are also able to re-use numbers. It means that for each number we start with, as we attempt with one number from the list to decrement towards 0, for the next step we can still choose from all numbers in the list. The result of the algorithm should be true or false returned based on whether the target sum is able to be created.

Let’s take a look…


Photo by Brett Zeck on Unsplash

What is a Map in JavaScript? A Map is a key-value store that holds values in it which are referenced by keys. When we want to retrieve a value, we reference the key, and we receive the value back in return. If you have spent any time writing JavaScript, you may immediately realize that the description of a Map is quite similar, if not exactly the same, (at least what I have revealed so far) as an Object. Per the MDN documentation, a Map is defined as:

The Map object holds key-value pairs and remembers the original insertion order of…


Photo by Saish Menon on Unsplash

When it comes to creating a serverless API solution in AWS, there is not just one single solution. Imagine you could have your own Node Express application, which you could run in a Docker Container using Fargate. In this scenario, we manage no servers. In fact, because Fargate uses Docker containers, actually this opens us up to being able to literally run anything we can create a Docker image for. In the scenario we are discussing above, we still need to write code to build the API. Even though this would be a serverless solution, you are still building out…


Photo by Mika Baumeister on Unsplash

Aside from being a common interview question, calculating the Nth Fibonacci number is an interesting exercise, because of the many different implementations, there are to achieve a solution. In a previous article I wrote, I demonstrated an iterative manner, a recursive manner, and then we modified the recursive algorithm to take advantage of memoization to reduce the exponential runtime complexity. If you are unfamiliar with these techniques you may want to check out that article here. In this article, I want to demonstrate another technique to calculate Fibonacci using tabulation. Before we get started I want to mention that this…


Photo by Danielle MacInnes on Unsplash

Sets are still relatively new in JavaScript and I still don’t see people taking full advantage of them.

In this article, we will explore the features of Sets and also look into a few examples where Sets can make our life easier.

General Concepts

A Set is a collection of elements that maintain insertion order, and only allows unique elements. If you insert five1’s in a row, only one will be inserted. When inserting, it will compare elements using === to determine if they should be inserted.

We need to be conscious of this fact because objects which are the exact same…


Photo by Alex Kulikov on Unsplash

Serverless is the new hottest buzzword in the software engineering industry. What does serverless even mean? When I heard this term I was very inexperienced in cloud architecture and it is easy to assume that there really are no servers in the background. This is not the case. The benefit of “serverless” is that you as a developer do not have to manage the servers. To run code in the cloud we need a virtual machine to run it on. For AWS, the most simple building block is EC2. This provides you based on your selection, with some capacity of…


Photo by Denys Nevozhai on Unsplash

When it comes to sorting algorithms, most implementations run in O(N²) runtime complexity. We must loop over each element and then for each loop we must perform another inner loop to do some sort of re-arranging based on which algorithm we have chosen to implement. It is this loop inside of a loop that gives us the quadratic runtime complexity. There are a few sorting implementations that attempt to do better than this. Three that are commonly discussed are Radix Sort, Quick Sort, and Merge Sort. Merge Sort will be the topic of this article, and I think also the…


Photo by Markus Winkler on Unsplash

A very common operation we perform when coding, is trying to determine if an element or item exists in an array.

This can be simple, such as determining if the number 5 exists in an array of integers, or trying to find out if the string "Hello" exists in an array of strings. Slightly more complicated is determining if an object is in an array, which is usually accomplished in a simple manner by having some unique key that identifies each object.

When it comes to searching through an array, not all techniques are the same. And in this particular…


Photo by Milan Popovic on Unsplash

I started coding full-time by attending a coding boot camp. As you can imagine a large focus towards the end of the course was around solving at least junior-level interview questions. This is a daunting task to take on, as solving interview questions, even with experience, can be a difficult task. This particular interview question was revered by me, as a junior developer looking for my first role, as a question that set apart lower-level junior developers and upper-level junior developers. In some ways, it was the holy grail of interview questions as a junior looking for my first role…


Photo by Todd Quackenbush on Unsplash

Arrays are some of the most commonly used data structures in Javascript. To work with them we have many different methods provided by the language to transform, refine, and make determinations about arrays in a more simple manner.

Choosing the right method for the right job is not so easy, especially when you are just starting out coding. This guide points to 6 of the most commonly used methods and attempts to help you see patterns that should point you in the direction of which Array method can help you solve your current problem most effectively.

Array.Map

This is by far…

David Hammond

Senior software engineer always trying to learn something new. Spend the majority of my time working with React, Angular, and developing cloud solutions.

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