LLD - Design — Online Shopping Cart
Examine this code snippet for a notification system:
What is the main issue that could cause notifications to fail?
class Subject:
def __init__(self):
self.observers = set()
def add_observer(self, observer):
self.observers.add(observer)
def notify_all(self):
for observer in self.observers:
observer.update()What is the main issue that could cause notifications to fail?
