Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Palindrome check · ⁨ตรวจสอบพาลินโดรม⁩

English

Palindrome check

A palindrome reads the same forwards and backwards. Return true if s does, ignoring case and spaces, so Race car counts. Clean the string first (toLowerCase, remove spaces), then compare characters moving inward from both ends.

ไทย

ตรวจสอบ Palindrome

Palindrome อ่านเหมือนกันทั้งไปและมา คืนค่า true หาก s ทำ, ignoring case และช่องว่าง, ดังนั้น Race car นับ Clean string ก่อน (toLowerCase, ลบช่องว่าง), แล้วเปรียบเทียบตัวอักษร moving inward จากทั้งสองด้าน

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP