Quant Memo
Coding/●●●●●

Is a message code a clean palindrome

A confirmation code should read identically forwards and backwards once you ignore punctuation, spaces, and letter case. Decide whether a given string is such a palindrome.

s = "Ab, ba!"
-> True          # cleaned to "abba"

Return True if the alphanumeric characters form a palindrome (case-insensitive), else False. Aim for O(n)O(n) time and O(1)O(1) extra space.

Your answer

This one is open-ended. Work it through, then check your reasoning against the full solution.

More Coding questions