Basic Algorithms For Leetcode Javascript Problems