Question 1 of 4

Palindrome Check

Strings

Print `yes` if `s` is a palindrome after removing spaces (case-sensitive), otherwise `no`.

Example 1:

Input: s = "race car"

Output: yes

Explanation: After removing spaces, "racecar" reads the same forwards and backwards.

Example 2:

Input: s = "hello"

Output: no

Example 3:

Input: s = "a"

Output: yes

Code

Testcase / Output

Default testcase

s = "race car"

Expected output

yes

Returned results

Click Run to execute your code against the testcase.