Skip to content

Commit 6cfbbb0

Browse files
Update LinearStringSearch.java
1 parent a6cd968 commit 6cfbbb0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Arrays/LinearStringSearch.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ public static void main(String[] args) {
88
System.out.println("'Input string array of what length you wish to input.");
99
int n = sc.nextInt();
1010
String[] a = new String[n];
11-
System.out.println("Input "+n+" words into the string.");
11+
System.out.println("Input "+n+" words into the string, make sure your array is sorted.");
1212
for (int i = 0; i < a.length; i++) {
1313
a[i] = sc.next();
1414
}
15-
Arrays.sort(a);
16-
System.out.println("Sorted Array: ");
15+
1716
for (int i = 0; i < a.length; i++) {
1817
System.out.print(a[i]+"\t");
1918
}

0 commit comments

Comments
 (0)