Correction palindrome
This commit is contained in:
parent
c02cfdbac6
commit
7fac0b5f63
@ -7,7 +7,14 @@ public class Palindrome {
|
||||
}
|
||||
|
||||
private static final boolean estPalindrome(char[] mot) {
|
||||
return false;
|
||||
for (int i=0; i < mot.length/2; i++) {
|
||||
char c1 = mot[i];
|
||||
char c2 = mot[mot.length -i-1];
|
||||
if (c1 != c2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user