← Amazon Interview Insights

Amazon·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Amazon frontend interview, one coding question focused on building a UI component from scratch. Pretty standard for the role but it took more thought than I expected.

Questions Asked (1)

Q1

Build an image carousel that displays a sequence of images, using either React or vanilla JS.

Technical Trade-offsSystem Design
Author's notes

I went with React because that's what I'm most comfortable with, but looking back I wonder if vanilla JS would've impressed them more since it shows you understand the fundamentals without leaning on a framework.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (e.g., autoplay, navigation controls, responsiveness, accessibility) and then outline a component-based architecture. Discuss trade-offs between React and vanilla JS, focusing on maintainability, performance, and reusability. Walk through the implementation details, including state management, event handling, and optimization techniques.

Pro tip: Demonstrate awareness of accessibility (keyboard navigation, ARIA roles) and performance (lazy loading, image optimization) to show you think beyond basic functionality. Also, mention how you would test the carousel (unit, integration, visual) to ensure reliability.

1. Clarify Requirements

Ask questions to understand the expected features: number of images, autoplay, navigation arrows/dots, infinite loop, responsiveness, accessibility, and browser support. This shows you prioritize user needs and avoid assumptions.

2. Choose Technology and Architecture

Decide between React and vanilla JS based on project context. For React, outline component structure (e.g., Carousel, Slide, Controls) and state management (useState/useReducer). For vanilla JS, describe DOM manipulation and event delegation.

3. Implement Core Functionality

Explain how to render images, handle navigation (next/prev, dots), and manage state (current index). Discuss edge cases like wrapping around and disabling buttons at ends if not infinite.

4. Optimize and Enhance

Add performance optimizations (lazy loading, preloading adjacent images), accessibility features (keyboard support, ARIA labels), and responsive design (CSS transitions, touch support).

5. Test and Iterate

Describe testing strategy: unit tests for logic, integration tests for interactions, and visual regression tests. Mention how you would handle feedback and iterate.

Key Points to Mention

  • Trade-offs between React and vanilla JS: React offers component reusability and state management, while vanilla JS is lighter and has no dependencies.
  • State management: using index state to track current slide, and handling transitions with CSS or JS animations.
  • Accessibility: keyboard navigation (arrow keys), ARIA roles (e.g., role='region', aria-live), and focus management.
  • Performance: lazy loading images, using Intersection Observer, and optimizing image sizes.
  • Responsiveness: using CSS media queries, touch events for mobile, and flexible layouts.
  • Testing: unit tests for navigation logic, integration tests for user interactions, and visual tests for layout.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.