Given two lists of elements, how do you find which items appear in both lists? The algorithm for Day 4 of 30 Days of Algorithms demonstrates how to find the overlap of two lists (list intersection).
Our algorithm for Day 3 of 30 Days of Algorithms is a Bubble Sort. Bubble Sort is not an efficient sort algorithm (The Big-O notation for the time complexity is 0n2) but it is useful for learning. The basic premise is very simple : Start with the first two items in the list. If the first item (left) is higher than the second item (right), swap them.
The algorithm for Day 2 of 30 Days of Algorithms is a useful formula to find a missing number in an array of numbers from 1 - N. This algorithm only works if there is one-and-only-one missing number, and no duplicate numbers. There are other algorithms for those cases which I will cover on a different day.
Euclid's algorithm finds the largest number that divides evenly into two numbers - the greatest common divisor (GCD). The Greek mathematician Euclid published the algorithm in his work, Elements in 300 BC.
I recently decided to re-enter the "real world" after freelancing for three years. My very first interview was at InVision. It did not go well, to say the least. The coding test focused on common algorithms in JavaScript, and I bombed. After receiving the polite rejection email, I asked the recruiter for feedback from the hiring team so I could improve.