Low Level Design, Object Oriented, Graph Data Structure, Hashmap, Interview Questions.
add an existing category def deleteProductCategory(self, prod_id, cat_id): # Delete category of a product try: n1 = self.nodes[(prod_id, "PRODUCT")] n2 = self.nodes[(cat_id, "CATEGORY")] # Remove the edges self.graph.deleteEdge(n1, n2) self.graph.deleteEdge(n2, n1) except Exception as e: