← Mastercard questions
CodingReported in a candidate post, Oct 2024

Palindrome check, optimised

Filed under Mastercard

Check whether a string is a palindrome (reads the same forwards and backwards). First give an O(n) solution, then optimise it, for example to use O(1) extra space. A follow-up asked whether a string…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Mastercard questions

Collected from public candidate posts and coding forums. Updated Nov 2026.