Find Missing Number Algorithm in JavaScript
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.