Algorithmic patterns · 10 / 15 Exercise Medium

Palindrome ignoring symbols

Objective

With two pointers starting at the ends and moving towards the centre, each pair of characters is compared. Here only letters and digits count, ignoring case.

Instructions

  • Read a line of English text (it may have spaces and symbols).
  • Show Palindrome or Not a palindrome.
Input
A man, a plan, a canal: Panama
Output
Palindrome

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise