Expedia Group interview question

Questions on how sets worked and also one in Java