-
40 min Coding. It was pretty hard, the approach was greedy + bit manipulation. Feels like Amazon doesn't want to hire anyone, lol
-
60 min Debug. This one is tricky, so let me roughly go over my approach:
The second part is an existing Django project, and you have to debug it based on the failing tests. You are not asked to write Django from scratch. The debug order I'd recommend is: Test → URL → View → QuerySet / Model → Response. Don't just see a test fail and start changing things randomly inside some function. I first group the failures by endpoint and check whether multiple tests actually come from the same root cause. For example, check these first:
- whether urls.py routes to the correct handler
- whether the view reads the query parameters the right way
- whether any filter conditions are missing
- whether the ORM query matches the model fields
- once the number of results is right, whether the sorting / tie-breaker is correct
- if it's a 500, just follow the traceback to see which layer blew up
- whether it also works when there is no query and only a filter
- how edge cases like rating / year are handled
- how to filter on fields like genre / director / writer
- in what order the final results are returned
-
Work style assessment: just open Amazon's Leadership Principles and answer against them.
-
A 5-minute test: just be consistent with your own personality. There is no right answer.
Discussion
Loading comments…