This question has come up a few times during technical interviews, but revolves around a single algorithm that appears quite often throughout many algorithm problems — name hashmaps.

A hashmap is an object in Javascript that has a key and value pair that can be used to keep a running…


For day 15, the problem is quite tricky as the order of operations is difficult to nail down.

You are given an array of numbers — and in this case an array of length 3. The function goes as such — the array of numbers is iterated through and every…


For day 13, you are given an input that is two lines. The first line contains a number that represents a time. The second line contains a string that has bus IDs that are separated with commas that take you to the destination. …


For day 12, you are given a set of direction and and you need to maintain the X and Y position from the origin. It also asks you to keep track of the direction that you are facing. …


For day 10, the explanation of the problem is a bit convoluted and can be simplified quite a bit. The input given is an unordered list of unique numbers where each number accepts a value within the list that is between 1 and 3 lower than the current value.

The…


For day 9, you are given a list of numbers. Starting from 26th indexed number, every number indexed further down is the sum of two numbers in the previous 25 numbers. The problem asks for which number is not a sum of any combination of the previous 25 numbers.

For…


For day 8, the input data is a stack of instructions. The stack of instructions, when followed properly, leads to an infinite loop. You are given in the instructions that every line can only be run once and to return the value prior to the start of the second iteration.


Today’s puzzle is quite confusing on how to complete. If we take a look at the sample data:

light red bags contain 1 bright white bag, 2 muted yellow bags.
dark orange bags contain 3 bright white bags, 4 muted yellow bags.
bright white bags contain 1 shiny gold bag.
muted yellow bags…


For Day 6, you are given a string of characters that represent the answer “Yes” to a question labeled with a single character. There are 26 possible possible questions as there are the same number of letters in the alphabet.

In the input data, each person is represented on a…


For Day 5, you are asked to use parse through a string of 10 characters which point to a specific seat on a plane. The airplane has 128 rows and 8 seats per row. The first seven characters, made up of F’s and B’s, identify the row of the seat…

Vincent Yang

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