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.

العربية

التحقق من العكسية

العكسية تُقرأ بنفس الاتجاهين. أدرِ true إذا فعلها s، متجاهلاً حالة الأحرف والمسافات، لذا Race car يعدّ. نظّف السلسلة أولاً (toLowerCase، أزل المسافات)، ثم قارن الأحرف بالتحرك للداخل من كلا الطرفين.

Log in or create account · ⁨تسجيل الدخول أو إنشاء حساب⁩

IGCSE, A-Level & AP