PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Amazon

Debug Watch List Movie Operations

Last updated: Jun 13, 2026

Quick Overview

This question evaluates backend debugging, RESTful API semantics, data validation and integrity, persistence behavior, and correct HTTP status and error-response handling for watch-list movie operations.

  • medium
  • Amazon
  • Software Engineering Fundamentals
  • Software Engineer

Debug Watch List Movie Operations

Company: Amazon

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Take-home Project

You are given a full-stack Movie DB application. Users can log in, create, update, and delete watch lists, and add or remove movies from a watch list. Several unit tests are failing around watch-list movie operations. Debug and fix the backend logic so the following scenarios work correctly: 1. Add a movie to an existing watch list. 2. Add a movie that is already present in the watch list. 3. Remove a movie from an existing watch list. 4. Add many movies to a watch list, then remove them one by one. 5. Try to add a movie to a watch list that does not exist. 6. Try to remove a movie from a watch list that does not exist. Your fix should ensure that: - The code checks whether the watch list exists before modifying it. - The code checks whether the movie exists when adding a movie. - Duplicate movies are not added to the same watch list. - Removing a movie updates the persisted watch list correctly. - All database changes are saved before returning a response. - Each failure case returns the correct HTTP status code and error response. Assume a conventional REST contract such as: - `POST /watchlists/{watchListId}/movies` adds a movie. - `DELETE /watchlists/{watchListId}/movies/{movieId}` removes a movie. - `404 Not Found` is returned when the watch list or movie does not exist. - `409 Conflict` is returned when attempting to add a duplicate movie. - `201 Created` or `200 OK` is returned for a successful add. - `200 OK` or `204 No Content` is returned for a successful delete, depending on the existing API convention.

Quick Answer: This question evaluates backend debugging, RESTful API semantics, data validation and integrity, persistence behavior, and correct HTTP status and error-response handling for watch-list movie operations.

Related Interview Questions

  • Design an advertiser metrics tracking platform - Amazon (medium)
  • Implement Review Content Moderation - Amazon (medium)
  • Validate AI-Generated Code Safely - Amazon (medium)
  • Fix the Password Reset Workflow - Amazon (medium)
  • Design an In-Memory Pub-Sub Model - Amazon (medium)
Amazon logo
Amazon
Jun 12, 2026, 12:00 AM
Software Engineer
Take-home Project
Software Engineering Fundamentals
1
0

You are given a full-stack Movie DB application. Users can log in, create, update, and delete watch lists, and add or remove movies from a watch list.

Several unit tests are failing around watch-list movie operations. Debug and fix the backend logic so the following scenarios work correctly:

  1. Add a movie to an existing watch list.
  2. Add a movie that is already present in the watch list.
  3. Remove a movie from an existing watch list.
  4. Add many movies to a watch list, then remove them one by one.
  5. Try to add a movie to a watch list that does not exist.
  6. Try to remove a movie from a watch list that does not exist.

Your fix should ensure that:

  • The code checks whether the watch list exists before modifying it.
  • The code checks whether the movie exists when adding a movie.
  • Duplicate movies are not added to the same watch list.
  • Removing a movie updates the persisted watch list correctly.
  • All database changes are saved before returning a response.
  • Each failure case returns the correct HTTP status code and error response.

Assume a conventional REST contract such as:

  • POST /watchlists/{watchListId}/movies adds a movie.
  • DELETE /watchlists/{watchListId}/movies/{movieId} removes a movie.
  • 404 Not Found is returned when the watch list or movie does not exist.
  • 409 Conflict is returned when attempting to add a duplicate movie.
  • 201 Created or 200 OK is returned for a successful add.
  • 200 OK or 204 No Content is returned for a successful delete, depending on the existing API convention.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.