mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: contest: detail fix
This commit is contained in:
1 parent
7e8a90a6b2
commit
a988445597
10 files changed
+10
-31
No files matched your search
@@ -130,12 +130,9 @@ Set.union = function Union<T>(setA: Set<T>, setB: Set<T>) {
|
||||
return union;
|
||||
};
|
||||
|
||||
Set.intersection = function Intersection<T>(setA: Set<T>, setB: Set<T>): Set<T> {
|
||||
const intersection = new Set();
|
||||
for (const elem of setB) {
|
||||
if (setA.has(elem)) intersection.add(elem);
|
||||
}
|
||||
// @ts-ignore
|
||||
Set.intersection = function Intersection<T>(setA: Set<T>, setB: Set<T>) {
|
||||
const intersection = new Set<T>();
|
||||
for (const elem of setB) if (setA.has(elem)) intersection.add(elem);
|
||||
return intersection;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user