24-sy-1.c 265 B

1234567891011121314
  1. #include <stdbool.h>
  2. bool isPalindrome(char *s){
  3. int len = strlen(s);
  4. int left = 0, right = len - 1;
  5. while (left < right) {
  6. if (s[left] != s[right]) {
  7. return false;
  8. }
  9. left++;
  10. right--;
  11. }
  12. return true;
  13. }
备用站点 当前处于降级运行的备用站点,仅供应急访问,数据和功能可能不是最新。