mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-14 17:32:35 +08:00
Merge pull request #1325 from mariaRoxana94/fix-error
Fixed 8XCorrectness_Bugs + 10XBad_Practice_Bugs + 14XDodgy_Code_Bugs
This commit is contained in:
@ -22,7 +22,7 @@ public class LongestIncreasingSubsequence {
|
||||
|
||||
private static int upperBound(int[] ar, int l, int r, int key) {
|
||||
while (l < r - 1) {
|
||||
int m = (l + r) / 2;
|
||||
int m = (l + r) >>> 1;
|
||||
if (ar[m] >= key)
|
||||
r = m;
|
||||
else
|
||||
|
@ -25,7 +25,7 @@ public class MatrixChainMultiplication {
|
||||
count++;
|
||||
}
|
||||
for (Matrix m : mArray) {
|
||||
System.out.format("A(%d) = %2d x %2d\n", m.count(), m.col(), m.row());
|
||||
System.out.format("A(%d) = %2d x %2d%n", m.count(), m.col(), m.row());
|
||||
}
|
||||
|
||||
size = mArray.size();
|
||||
|
Reference in New Issue
Block a user