Amazon OA 2026 | Code Repo Debugging Round | SDE-1, SDE-2 & Internship (New Pattern)
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:
1)Traverses category hierarchies and includes all relevant subcategories.
2)Filters products based on the requested region.
3)Ranks eligible products according to their popularity.
Returns the correct number of products in the required format.
Full code solution in the comments!


