Check the time

Report a typo

Select the operations in the code below that include time complexity of O(1)O(1).

grades = set([100, 200, 300])
scores = {"Alice": 100, "Bob": 200, "Cathy": 300}
departments = ("CS", "EE", "ME")

"CS" in departments     # (1)
200 in grades           # (2)
100 in scores.values()  # (3)
"Cathy" in scores       # (4)
Select one or more options from the list
___

Create a free account to access the full topic