For a set. What is the time complexity for next(iter(S))? Any proof?
next(iter(S))
I know that iter() turns an iterable into iterator and suppose next() is O(1).