Skip to content

Commit 1742458

Browse files
Update LinearSearch.java
1 parent c2ba3b4 commit 1742458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LinearSearch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static void main(String args[])throws IOException{
1010
int n = sc.nextInt();
1111
int arr[]= new int[n];
1212
for(int i=0;i<n;i++)
13-
arr[i]=(int)(Math.random());
13+
arr[i]=(int)(1000*Math.random());
1414

1515
System.out.print("\nEnter the key to be searched: ");
1616
int key = sc.nextInt();
@@ -33,4 +33,4 @@ public int Search(int arr[], int key, int n){
3333
return 1;
3434
return 0;
3535
}
36-
}
36+
}

0 commit comments

Comments
 (0)