InterviewLegend

Trees, Lists and Chains

Alex Chen30 min readUpdated 33 real interview reports

These four problems share one skill. You follow links and keep track of what you can reach from where you stand. Sometimes the link you need points the wrong way, and sometimes you can't see the node behind you.

The first one comes from the online assessment. The other three have come up in live rounds, from intern panels to SDE-2 interviews, and range from easy to medium. In each one, name the pointer you're missing before you write the loop.

The American Express angle
Amex frames these as accounts and records, but the structures underneath are plain. They're trees, linked lists and maps. Drop the card story first, then say which link you need and how you'll get it, such as a parent map or a visited set. Expect questions on what each operation costs as you go.

American ExpressPremium lesson · Coding round

The 4 American Express problems are below.

  1. A Premium questionCoding · Easy
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Easy

+ 1 more in this lesson

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.

Had your American Express interview?Tell us what they asked. Reviewed before it goes in, never with your name.
American Express interview guide

Know what American Express asks before you walk in.

30 coding · 3 system design · 15 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.