Skip to content

求公共元素#217

Open
3stonelei wants to merge 2 commits into
hcsp:masterfrom
3stonelei:master
Open

求公共元素#217
3stonelei wants to merge 2 commits into
hcsp:masterfrom
3stonelei:master

Conversation

@3stonelei

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

@hcsp-bot

hcsp-bot commented Jun 5, 2022

Copy link
Copy Markdown
Contributor

🎉 感谢提交Pull Request!请稍等片刻,我们已经将其提交到CI进行检查,一旦有结果会立即通知您!

import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.*;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

不应使用 '.*' 形式的导入 - java.util.* 。

// 请编写一个方法,获得a和b集合中的公共元素。
public static Set<Person> commonElementsIn(List<Person> a, List<Person> b) {}
public static Set<Person> commonElementsIn(List<Person> a, List<Person> b) {
Set<Person> personSet=new HashSet<>(a);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'=' 后应有空格。
'=' 前应有空格。


Person person = (Person) o;

return Objects.equals(name,((Person) o).name);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

',' 后应有空格。


@Override
public String toString() {
return "Person{" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'+' 应另起一行。

@Override
public String toString() {
return "Person{" +
"name='" + name + '\'' +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'+' 应另起一行。

@hcsp-bot

hcsp-bot commented Jun 5, 2022

Copy link
Copy Markdown
Contributor

你的提交 9cef369 ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

1 similar comment
@hcsp-bot

hcsp-bot commented Jun 5, 2022

Copy link
Copy Markdown
Contributor

你的提交 9cef369 ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

@hcsp-bot

hcsp-bot commented Jun 5, 2022

Copy link
Copy Markdown
Contributor

你的提交 b8df7d8 ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

1 similar comment
@hcsp-bot

hcsp-bot commented Jun 5, 2022

Copy link
Copy Markdown
Contributor

你的提交 b8df7d8 ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

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.

2 participants