mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-15 01:40:49 +08:00
Closing scanners.
This commit is contained in:
@ -74,5 +74,6 @@ public class EditDistance {
|
||||
//ans stores the final Edit Distance between the two strings
|
||||
int ans = minDistance(s1, s2);
|
||||
System.out.println("The minimum Edit Distance between \"" + s1 + "\" and \"" + s2 + "\" is " + ans);
|
||||
input.close();
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ public class Fibonacci {
|
||||
System.out.println(fibMemo(n));
|
||||
System.out.println(fibBotUp(n));
|
||||
System.out.println(fibOptimized(n));
|
||||
sc.close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,6 +17,7 @@ public class LongestIncreasingSubsequence {
|
||||
}
|
||||
|
||||
System.out.println(LIS(ar));
|
||||
sc.close();
|
||||
}
|
||||
|
||||
private static int upperBound(int[] ar, int l, int r, int key) {
|
||||
|
Reference in New Issue
Block a user