Amazon Online Assessment Coding Interview: Design a Product Search System by Category, Price, and Prime Eligibility

16 Views
No Comments

Amazon products are stored hierarchically within their respective categories.

Products have various metadata, such as current price and whether they are Prime-eligible. For example, a dress might be located under Clothing > Women > Dresses, with a price of 20 and Prime eligibility enabled.

It should be easy to add additional criteria to search by in the future.

Initially, the system only needs to handle queries by category or max price.

This problem asks you to design a flexible product search system where items are organized in a category hierarchy and annotated with metadata such as price and Prime eligibility. The initial requirements are simple: support searching by category or by maximum price, while keeping the design extensible for future filters. A good solution usually models the category tree with maps or nodes, then applies query filters through a modular search layer so additional criteria can be added without reworking the core structure.

END
 0