The Amazon Leadership Principles + Coding Mix

Five Java questions from an SDE2 loop where every coding prompt was framed by a leadership principle. The interviewer wanted my decision trail, not just the algorithm. Each entry shows the LP they were probing.

Question Bundle
Java
interview-prep
amazon
amazon-lp
leadership-principles
zarakamau

By @zarakamau

December 26, 2025

·

Updated May 18, 2026

1,179 views

5

4.3 (14)

LP: Customer Obsession. Given an array of numbers and a target, return the indices of the two numbers that add up to the target. Optimize for a single pass and explain why that matters in a customer-facing path.

In practice

In practice the interviewer asked me to dry-run a few inputs. twoSum([2, 7, 11, 15], 9) returns [0, 1]. twoSum([3, 3], 6) returns [0, 1] (duplicates work because the hash map stores the earlier index, then the pair is found on the second). twoSum([1, 2, 3], 7) returns [] because no pair matches.

4 more questions and all solutions are locked.

Purchase this item to access all questions, code snippets, and solutions.