What is the asymptotic complexity of the set to list operation? Is it O(1) or O(n)? I mean this one:
O(1)
O(n)
a = set() for i in range(1000000): a.add(i) a = list(a)
Aucun commentaire:
Enregistrer un commentaire