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.
1 parent ec4f6a1 commit a23a17bCopy full SHA for a23a17b
DataStructures/HashMap/Hashing/Intersection
@@ -1,3 +1,30 @@
1
+package DataStructures.HashMap.Hashing;
2
+/*
3
+* this is algo which implies common mathematical set theory concept
4
+* called intersection in which result is common values of both the sets
5
+* here metaphor of sets is HashMap
6
+
7
8
+Test Case:
9
+ Scanner scn=new Scanner(System.in);
10
+ int len =scn.nextInt();
11
+ int arr[]=new int[len];
12
+ int arr2[]=new int[len];
13
14
+ for(int i=0;i<2*len;i++) {
15
16
+ if(i<len)
17
+ arr[i]=scn.nextInt();
18
+ if(i>=len) {
19
+ arr2[i-len]=scn.nextInt();
20
+ }
21
22
+ System.out.println(Main(arr,arr2));
23
24
25
26
+*/
27
28
import java.util.ArrayList;
29
import java.util.HashMap;
30
import java.util.Map;
0 commit comments