This comment is hidden because it contains spoiler information about the solution
Nice solution
This is fire
Wow. Just wow.
You are right. Here are benchmark results
Indeed. Here are results, where The cleverest - the first. My - third in this compilation.
This one is the winner, except the second order by isn't necessary. Still, O(nlogn) is the best complexity.
This is incredibly slow, as Enumerable.Range needs to generate every number in every range you feed it.
If you don't want to copy the parameter (time and memory constraints), but want to use it without altering it, you pass it by const reference.
Loading collection data...
This comment is hidden because it contains spoiler information about the solution
Nice solution
This is fire
Wow. Just wow.
This comment is hidden because it contains spoiler information about the solution
You are right. Here are benchmark results
Indeed. Here are results, where The cleverest - the first. My - third in this compilation.
This one is the winner, except the second order by isn't necessary. Still, O(nlogn) is the best complexity.
This is incredibly slow, as Enumerable.Range needs to generate every number in every range you feed it.
This comment is hidden because it contains spoiler information about the solution
If you don't want to copy the parameter (time and memory constraints), but want to use it without altering it, you pass it by const reference.