mirror of
				https://git.wolves.top/wolves/leetcode.git
				synced 2025-11-04 17:26:32 +08:00 
			
		
		
		
	init
This commit is contained in:
		
							
								
								
									
										14
									
								
								we/24-sy-1.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								we/24-sy-1.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
#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;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user