YourAlly

Amazon L7 coding interview questions

These are the 6 coding questions YourAlly has tagged for Amazon at L7. Amazon L7 is Principal SDE. YourAlly treats it as Staff (E6), the same level as Google L6 and Meta E6. Amazon L7 is not the same level as Google L7 or Meta E7, which are Senior staff.

A coding round at a large tech company usually runs 45 to 60 minutes with one or two problems. You write code that runs, test it on your own examples and state its time and space cost. At this level interviewers also expect clean code quickly and edge cases you raise before they do.

Practice a mock Amazon L7 coding loopPractice Amazon coding questions

Fewest Shuttle TransfersFree to read

Campus shuttles loop forever over fixed stop lists. You start at stop source and want to reach stop target. Return the fewest shuttles you must board, 0 if you are already there, or -1 if it is impossible.

Input: routes = [[1,2,7],[3,6,7]], source = 1, target = 6 Output: 2

What a strong answer covers

  • BFS where a layer is one more shuttle
  • Stop-to-routes index
  • Visited set on routes, not just stops
  • O(sum of route lengths) time
  • Handles source == target and unreachable target

5 more coding questions

  1. Critical Links Between Availability Zones Locked
  2. Maximize Delivery Slot Revenue Locked
  3. Rolling Median Request Latency Locked
  4. Shortest Aisle Span Covering an Order Locked
  5. Merge Two Sorted Lists Locked

Sign up free to practice all 6

Related pages

More Amazon L7 rounds

Amazon coding at other levels

  • L6 10 questions
  • L8 6 questions

Other companies at this level

Company guide

Amazon interview guide in Academy