Two Sum Algorithm Javascript Interview Question