begin queen's problem JS algorithm