Low Level Design, Object Oriented, Graph Data Structure, Hashmap, Interview Questions.
cat_ids: self.product_categories[prod_id].add(cat_id) self.category_products[cat_id].add((price, prod_id)) except Exception as e: print("Error: ", e) How we can update the price of a product? def setPriceOfProduct(self, prod_id, price): # Set price of product try: # From sorted set in category to