-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLINEAR_PROBING.java
More file actions
45 lines (43 loc) · 1.41 KB
/
LINEAR_PROBING.java
File metadata and controls
45 lines (43 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import java.util.*;
public class LINEAR_PROBING {
void insert(){
}
static void main(){
Scanner sc=new Scanner(System.in);
IO.print("Enter the size of the HASH : ");
int size= sc.nextInt();
int[] lp =new int[size];
Arrays.fill(lp,-1);
int o=-1;
while(o!=5){
IO.println("MENU :-----------");
IO.println("1. INSERT ");
IO.println("2. Remove");
IO.println("3. Search ");
IO.println("4. Display ");
IO.println("5. Exit>>>>");
IO.print("Enter Your Option : ");
o=sc.nextInt();
switch(o){
case 1:
IO.print("Enter the Value : ");
int n=sc.nextInt();
//lp.add(n);
break;
case 2:
IO.print("Enter the value to Remove : ");
n=sc.nextInt();
//lp.remove(n);
break;
case 3:
IO.print("Enter the Elelment to Search : ");
n =sc.nextInt();
// IO.print((lp.contains(n))?"Value Is present in Lenear Probing ":"Not Present in the Linear Probing...........");
break;
case 4:
IO.print("Display : ");
//for(int )
}
}
}
}