Skip to content

取相同元素#36

Merged
hcsp-bot merged 1 commit into
masterfrom
lyz
Sep 22, 2019
Merged

取相同元素#36
hcsp-bot merged 1 commit into
masterfrom
lyz

Conversation

@sceraser

Copy link
Copy Markdown
Contributor
  • 这个PR解答了当前仓库中的题目(机器人会自动判题并合并当前PR)
  • 这个PR修复了当前仓库中的一些代码缺陷(机器人不会判题,而是由管理员来处理当前PR)

@hcsp-bot

Copy link
Copy Markdown
Contributor

🎉 感谢提交Pull Request!请稍等片刻,我们已经将其提交到CI进行检查,一旦有结果会立即通知您!
不过,我们发现你在这个仓库中还打开了其他的Pull Request:

#35

我们不鼓励同时打开多个Pull Request,请集中精力于现在的这个Pull Request,谢谢!:pray:

@hcsp-bot

Copy link
Copy Markdown
Contributor

恭喜你,你的提交 244463e 已经通过我们的CI检查:Your tests passed on CircleCI!

👍 它会被自动merge后revert。请不要骄傲,继续挑战!

@hcsp-bot hcsp-bot merged commit a93be79 into master Sep 22, 2019
hcsp-bot added a commit that referenced this pull request Sep 22, 2019
// Arrays.asList() 返回的list是不可以修改的
List<Person> l1 = new ArrayList<>(a);
List<Person> l2 = new ArrayList<>(b);
l1.retainAll(l2);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

两个ArrayListretainAll的效率很低(想一想为什么?),因此这里最好用两个HashSetretainAll操作,因为毕竟最后还要返回一个HashSet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants