Skip to content · ⁨דלג לתוכן⁩

Palindrome check · ⁨בדיקת פלindrome⁩

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