Amazon software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.
No verified questions yet for Amazon.
NotificationSystem class to manage notifications.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.subscribe("user1"); schedule_notification("user1", "Order shipped!", datetime.now())Nonesend_notifications()"Notifications sent to all subscribers."TicketBooking that manages shows and tickets.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.add_show("Spider-Man", "2022-10-01 19:00", 100); book_ticket("Spider-Man", 5); available_tickets("Spider-Man")95cancel_booking("Spider-Man", 3); book_ticket("Spider-Man", 2)"Successfully booked 2 tickets."Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free