Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<arg>-Xlint:all</arg>
<arg>-Xlint:-auxiliaryclass</arg>
<arg>-Xlint:-rawtypes</arg>
<arg>-Xlint:-try</arg>
<arg>-Xlint:-unchecked</arg>
<arg>-Xlint:-lossy-conversions</arg>
<arg>-Werror</arg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public static void main(String[] args) {

System.out.println("Plaintext: ");
System.out.println(plaintext);
sc.close();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public void go() { // shows distance to all vertices // Interactive run for unde
System.out.println();
}
}
sc.close();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public static void main(String[] args) {
for (i = 0; i < n; i++) {
stack.push(sc.nextInt());
}
sc.close();
reverseStack(stack);
System.out.println("The reversed stack is:");
while (!stack.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ public static void main(String[] args) {
arr[i] = sc.nextInt();
}

try {
sc.close();
} catch (Exception e) {
System.out.println("Unable to close scanner" + e);
}

// Find XOR of the 2 non repeating elements
for (i = 0; i < n; i++) {
res ^= arr[i];
Expand All @@ -55,7 +49,6 @@ public static void main(String[] args) {
}

System.out.println("The two non repeating elements are " + num1 + " and " + num2);
sc.close();
}
}
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public static void main(String[] args) {
for (i = 0; i < size2 - 1; i++) {
System.out.println(b[i]);
}
s.close();
}
}
}
3 changes: 0 additions & 3 deletions src/main/java/com/thealgorithms/sorts/LinkListSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
package com.thealgorithms.sorts;

import java.util.Arrays;
import java.util.Scanner;

public class LinkListSort {

public static boolean isSorted(int[] p, int option) {
try (Scanner sc = new Scanner(System.in)) {
}
int[] a = p;
// Array is taken as input from test class
int[] b = p;
Expand Down