Arrays, Hashing & Strings
Most Amazon loops open here. Medium problems, no Run button, and an interviewer grading two things at once: did you land on the right data structure, and can you explain why it works. A hash map or a sliding window collapses an O(n²) brute force into one clean sweep. Show that collapse and you've banked most of the points on offer.
Two ideas cover almost all of it. A hash map answers "have I seen this key, and where" in constant time, which kills nested-loop scans. A sliding window keeps a stretch of the array under a rule by moving two pointers, so you re-read each element once instead of re-scanning every subarray. Learn those two. The rest is bookkeeping.
- 3 problems, worked step by step
- about 22 min
Premium lessonAmazon interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · 30-day money-back guarantee
Amazon interview guideKnow what Amazon asks before you walk in.
19 coding · 6 system design · 44 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.