Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit efbc582

Browse files
Update 数据结构.md
Set集合子类HashSet与TreeSet去除重复实现。
1 parent d7c984b commit efbc582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎docs/dataStructures-algorithms/数据结构.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Queue 用来存放 等待处理元素 的集合,这种场景一般用于缓冲
4747
### 什么是 Set
4848
Set 继承于 Collection 接口,是一个不允许出现重复元素,并且无序的集合,主要 HashSet 和 TreeSet 两大实现类。
4949

50-
在判断重复元素的时候,Set 集合会调用 hashCode()和 equal()方法来实现。
50+
在判断重复元素的时候,HashSet 集合会调用 hashCode()和 equal()方法来实现;TreeSet 集合会调用compareTo方法来实现
5151

5252
### 补充:有序集合与无序集合说明
5353
- 有序集合:集合里的元素可以根据 key 或 index 访问 (List、Map)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /