mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
Remove unnecessary code (#4141)
This commit is contained in:
@@ -27,7 +27,7 @@ class Solution {
|
||||
String maxStr = "";
|
||||
for (int i = 0; i < n; ++i) {
|
||||
for (int j = i; j < n; ++j) {
|
||||
if (isValid(s, i, j) == true) {
|
||||
if (isValid(s, i, j)) {
|
||||
if (j - i + 1 > maxStr.length()) { // update maxStr
|
||||
maxStr = s.substring(i, j + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user