.net8

Collections search Read in English

During interviews, we often hear — or say ourselves — that searching in an array is slower than in a hashtable. Some might even recall that array search has linear complexity, or O(n), while a hash table has constant complexity, O(1). But does this hold true in practice? What if there are situations where searching in an array turns out to be faster? Let's not rush to conclusions.

Read more...

Any() vs Count: part 2 Read in English

In Part 1, we compared Any() and Count methods for different collections and proposed optimization approaches.

Read more...