¥Description
Set 对象是值的集合。集合中的值只能出现一次;它在该系列的收藏中是独一无二的。你可以按插入顺序迭代集合的元素。插入顺序对应于 add() 方法成功将每个元素插入集合中的顺序(即,调用 add() 时集合中尚不存在相同的元素)。
¥Set objects are collections of values. A value in the set may only occur once; it is unique in the set's collection. You can iterate through the elements of a set in insertion order. The insertion order corresponds to the order in which each element was inserted into the set by the add() method successfully (that is, there wasn't an identical element already in the set when add() was called).
该规范要求实现 "平均而言,提供的访问时间与集合中元素的数量呈次线性关系" 集。因此,它可以在内部表示为哈希表(具有 O(1) 查找)、搜索树(具有 O(log(N)) 查找)或任何其他数据结构,只要复杂度优于 O (N)。
¥The specification requires sets to be implemented "that, on average, provide access times that are sublinear on the number of elements in the collection". Therefore, it could be represented internally as a hash table (with O(1) lookup), a search tree (with O(log(N)) lookup), or any other data structure, as long as the complexity is better than O(N).
大搜车怎么样?
[讨论]关于全局及深渊爆率详细说明!!