Amazon logo

Amazon Software Engineer System Design Questions

43 practice questions for Amazon Software Engineer interviews

Amazon software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer

No verified questions yet for Amazon.

system design Senior messaging #1

1. Design Notification System — Manage User Notifications

Background: Amazon Mobile and Web Services can greatly benefit from an optimized notification system. This system is crucial for enhancing customer experience by managing notifications effectively and ensuring delivery reliability.
Requirements:
1. Create a NotificationSystem class to manage notifications.
2. Allow users to subscribe and unsubscribe to notifications.
3. Enable scheduling notifications for specific times.
4. Provide functionality for sending out notifications to all subscribers.
5. Ensure that notifications can be prioritized based on urgency.
Class API:
  • def __init__(self): return type None, initializes the notification system.

  • def subscribe(self, user_id: str) -> None: return type None, adds user to subscription list.

  • def unsubscribe(self, user_id: str) -> None: return type None, removes user from subscription list.

  • def schedule_notification(self, user_id: str, message: str, send_time: datetime) -> None: return type None, schedules a notification.

  • def send_notifications(self) -> None: return type None, sends out all scheduled notifications.

Example 1:
  • Input sequence: subscribe("user1"); schedule_notification("user1", "Order shipped!", datetime.now())

  • Output: None

  • Explanation: User 'user1' subscribed and a notification scheduled.

Example 2:
  • Input sequence: send_notifications()

  • Output: "Notifications sent to all subscribers."

  • Explanation: Executes sending notifications to all users.

Constraints:
  • The system must handle up to 10000 subscriptions concurrently.

  • Notifications can be sent at most once every minute.
system design Senior api design #2

2. Design BookMyShow — Simple Ticket Booking System

Background: Amazon has a vast range of services, and a user-friendly ticket booking system similar to BookMyShow can enhance their entertainment sector's offerings. This system is critical for managing ticket availability and customer satisfaction.
Requirements:
1. Create a class called TicketBooking that manages shows and tickets.
2. The class must allow adding new shows with specific details (name, time, and total seats).
3. Enable booking of tickets while ensuring only available seats are bookable.
4. Provide a method to view available tickets for each show.
5. Implement a method to cancel a booking.
Class API:
  • def __init__(self): return type None, initializes the booking system.

  • def add_show(self, show_name: str, show_time: str, total_seats: int) -> None: return type None, adds a new show.

  • def book_ticket(self, show_name: str, number_of_seats: int) -> str: return type str, books tickets if available.

  • def cancel_booking(self, show_name: str, number_of_seats: int) -> str: return type str, cancels booked tickets.

  • def available_tickets(self, show_name: str) -> int: return type int, returns remaining tickets.

Example 1:
  • Input sequence: add_show("Spider-Man", "2022-10-01 19:00", 100); book_ticket("Spider-Man", 5); available_tickets("Spider-Man")

  • Output: 95

  • Explanation: 5 tickets booked, 95 remaining.

Example 2:
  • Input sequence: cancel_booking("Spider-Man", 3); book_ticket("Spider-Man", 2)

  • Output: "Successfully booked 2 tickets."

Constraints:
  • The maximum number of shows should not exceed 1000.

  • Each show can have a maximum of 500 seats.

Related Amazon Software Engineer interview prep

Start practicing Amazon questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free