Lab 3, cosmetic.
This commit is contained in:
parent
97b2b761e4
commit
2b8f88a45f
|
@ -13,8 +13,8 @@ public class lab_3 {
|
||||||
leftBoundary--;
|
leftBoundary--;
|
||||||
rightBoundary++;
|
rightBoundary++;
|
||||||
}
|
}
|
||||||
// if it's length is greater than maxLength update
|
// if it's length is greater than maxStrLength update
|
||||||
// maxLength and res
|
// maxLength and result
|
||||||
if (rightBoundary - leftBoundary - 1 >= maxStrLength) {
|
if (rightBoundary - leftBoundary - 1 >= maxStrLength) {
|
||||||
result = string.substring(leftBoundary + 1, rightBoundary);
|
result = string.substring(leftBoundary + 1, rightBoundary);
|
||||||
maxStrLength = rightBoundary - leftBoundary - 1;
|
maxStrLength = rightBoundary - leftBoundary - 1;
|
||||||
|
|
Loading…
Reference in New Issue