What is the complexity of next(iter(set)) python3?

后端 未结 0 692
醉梦人生
醉梦人生 2020-12-03 04:37

For a set. What is the time complexity for next(iter(S))? Any proof?

I know that iter() turns an iterable into iterator and suppose next() is O(1).

相关标签:
回答
  • 消灭零回复
提交回复
热议问题