Amazon OA 2026 | Code Repo Debugging Round | SDE-1, SDE-2 & Internship (New Pattern)
- Posted
- 31 Oct 2026
Summary
I was given a debugging problem where I needed to fix a category browsing engine to correctly traverse hierarchies, filter products by region, and rank them by popularity.
How it went
Problem Description :
You are working on a C++ category browsing engine for an e-commerce platform. The engine is responsible for generating region-specific, popularity-ranked product listings for a requested category and all its subcategories.
Currently, the browser engine is not functioning correctly. It may miss products belonging to subcategories, include products from unrelated categories, return products from incorrect regions, or rank products in the wrong order.
Your task is to debug and fix the existing browse engine so that it correctly:
- Traverses category hierarchies and includes all relevant subcategories.
- Filters products based on the requested region.
- Ranks eligible products according to their popularity. Returns the correct number of products in the required format.
Full code solution in the comments!
Questions asked (1)
- 01
Category Browsing Engine Debugging
Other
You need to debug and fix a C++ category browsing engine for an e-commerce platform. The engine must generate region‑specific, popularity‑ranked product listings for a requested category and all its subcategories. It should:
- Traverse category hierarchies and include all relevant subcategories.
- Filter products based on the requested region.
- Rank eligible products according to their popularity. The engine currently may miss subcategory products, include unrelated categories, return wrong regions, or rank incorrectly. Your task is to correct these issues and return the correct number of products in the required format.