Algorithms Solved in Javascript