Answer the question
In order to leave comments, you need to log in
What is the algorithmic complexity of converting an array to a set, via Set(array)?
I solve problems, it is not clear how to take into account the complexity of converting array to set.
According to the idea, Set() loops through all the elements, that is, it adds O (n).
Or does it somehow work directly with memory?
Answer the question
In order to leave comments, you need to log in
Direct, curved - what does this have to do with algorithmic complexity?
O(n).
The question is in which operations to consider the complexity.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question