Strings and Palindromes
String questions at Amex stay short. US entry-level and intern screens tend to ask for a quick palindrome question in Java. SDE rounds in India have gone a step further, with substring problems that need a window or an expanding center. All three fit on one screen, and each can still fail on an index.
The three build on each other. In the first, two indices move toward the middle. Next comes a window that slides to the right and remembers where each character last appeared. For the last one you turn the first idea inside out and grow outward from every center. If you can explain the bounds on each loop, you can explain all three.
charAt one past the end throws StringIndexOutOfBoundsException, and substring(lo, hi) stops one short of hi. Expect a JVM question or two mid-problem, such as what garbage your loop leaves for the collector. Answer it from the code on your screen, then get back to the loop.American ExpressPremium lesson · Coding round
The 3 American Express problems are below.
- A Premium questionCoding · Easy
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
Each with hints, the follow-up and a tested solution.
Get the American Express questions$49 a year · all 100 companies · cancel anytime
From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.
American Express interview guideKnow what American Express asks before you walk in.
30 coding · 3 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.