Amazon - Senior FEE

Title:
Amazon - Senior Front End Engineer - Phone Interview

Description:
Level: L5
Education: Masters
Years of Experience (YOE): 5
Questions Asked:
1) Implement a Typeahead (Autocomplete) Widget:
Prompt: Build a typeahead search input that shows suggestions as the user types.

Example 1:
Input: User types: "ap"
Suggestions (data): ["apple", "apricot", "banana", "grape"]
Output/UI: Show dropdown: ["apple", "apricot"]

Example 2:
Input: User types: "gra"
Suggestions (data): ["grape", "grapefruit", "apple"]
Output/UI: Show dropdown: ["grape", "grapefruit"]

Key Requirements Discussed:

  • Filter suggestions based on current query (prefix match).
  • Update suggestions on each keystroke.
  • Click a suggestion to populate the input.
  • Handle empty input (hide dropdown).
  • Basic keyboard support (up/down + enter) came up as a follow-up.
  • Amazon mentioned vanilla JavaScript, but React was allowed and accepted.

Tags: amazon #SeniorFrontEndEngineer #L5 #PhoneInterview Frontend #React #JavaScript #Typeahead #Autocomplete