C# Linq SelectMany complexity

Viewed 488

What is the complexityclass of a Linq Queryable.SelectMany.

I'm looking for Big O notation to predict runtime efficiency.

I checked Microsoft Docs and several other sources.

In this StackOverflow complexity is noted as O(N^2) what doesn't make sense to me due to probably more efficient attemps copying N memory blocks to a new connected one.

I predict the complexity to be O(N).

Can you point me to references where complexityclass for SelectMany is explicity named, or give hints why complexity is O(N^2).

Help is appreciated, Cookies for best answer. Thanks

0 Answers
Related