Palindrome
Palindrome
Return 1 if a C-string reads the same in both directions, otherwise 0 — in C there's no bool by default, so we use the integers 1 and 0. Compare characters from the two ends moving inward.
พาลินโดรม
Return 1 if a C-string reads the same in both directions, otherwise 0 — in C there's no bool by default, so we use the integers 1 and 0. Compare characters from the two ends moving inward.
Complete int is_palindrome(const char *s) to return 1 if s reads the same forwards and backwards, otherwise 0. · เติม int is_palindrome(const char *s) ให้กลับ 1 หาก s อ่านได้เหมือนกันทั้งหน้าและหลัง มิฉะนั้นให้กลับ 0
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่