Files
leetcode/we/24-sy-1.c
2025-09-15 21:12:04 +08:00

14 lines
265 B
C

#include <stdbool.h>
bool isPalindrome(char *s){
int len = strlen(s);
int left = 0, right = len - 1;
while (left < right) {
if (s[left] != s[right]) {
return false;
}
left++;
right--;
}
return true;
}