We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 77423ae + 32ddebf commit eb29870Copy full SHA for eb29870
intersection-of-two-arrays/index.ts
@@ -0,0 +1,4 @@
1
+export default function intersection(nums1: number[], nums2: number[]): number[] {
2
+const set=new Set(nums2)
3
+return Array.from(new Set(nums1.filter(a=>set.has(a))))
4
+}
0 commit comments