import java.util.*;
public class Solution {
public boolean judge (String str) {
int left = 0;
int right = str.length() - 1;
while(left < right){
if(str.charAt(left) != str.charAt(right))
return false;
left++;
right--;
}
return true;
}
}
牛客-TOP101-BM88
最新推荐文章于 2024-11-08 23:36:48 发布