Two Sum Algorithm Javascript Interview Programming