
Amazon


Amazon Software Development Engineer 1 Interview Questions and Answers
Q1. 4. Design a system for making table reservations at a restaurant.
Design a system for making table reservations at a restaurant.
Create a user-friendly interface for customers to make reservations
Allow customers to select date, time, and party size
Provide real-time updates on table availability
Integrate with the restaurant's seating chart and reservation system
Send confirmation emails or texts to customers
Allow customers to modify or cancel reservations
Provide analytics for the restaurant to track reservations and customer behavior
Q2. 2. Number of islands - Leetcode
Count the number of islands in a 2D grid of 1s and 0s.
An island is a group of connected 1s (horizontally or vertically).
Use DFS or BFS to traverse the grid and mark visited cells.
Count the number of times you start a traversal from an unvisited 1.
Q3. Remove duplicates from a list
Remove duplicates from a list
Create a new empty list
Loop through the original list
If an element is not in the new list, add it
Return the new list
Q4. Explain the code that you wrote in detail.
The code I wrote is a function that sorts an array of integers in ascending order using bubble sort algorithm.
The code starts by iterating through the array and comparing adjacent elements, swapping them if they are in the wrong order.
This process is repeated until no more swaps are needed, indicating that the array is sorted.
The time complexity of bubble sort is O(n^2) in the worst case scenario.
Example: int[] arr = {5, 2, 9, 1, 5}; After sorting: {1, 2, 5, 5, 9}
Q5. MAX intersections in a range of time.
Find maximum number of intersections in a given time range.
Consider all the intervals and their start and end times.
Sort the intervals based on their start times.
Use a priority queue to keep track of the intervals that are currently active.
Update the maximum number of intersections whenever a new interval is added or removed from the priority queue.
Q6. Median in stream of Numbers.
Finding the median of a stream of numbers.
Maintain two heaps, one for smaller half and one for larger half of the stream.
If the heaps are of equal size, median is the average of the top elements of both heaps.
If the heaps are of different sizes, median is the top element of the larger heap.
Add new elements to the appropriate heap and balance the heaps accordingly.
More about working at Amazon










Interview Process at Amazon Software Development Engineer 1



Reviews
Interviews
Salaries
Users/Month

