|
Data Structures and Algorithms
with Object-Oriented Design Patterns in Python |
class SearchableContainer(Container):
def withdrawAll(self, obj):
while true:
match = self.find(obj)
if match is None:
break
self.withdraw(match)
# ...
Determine the worst-case running time of this method
for each of the following cases: