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.