Answers for "c# fastest way to find item in list"

0

c# fastest way to find item in list

If your goal is just to make it very fast to find the
strings in a collection, put them into a HashSet.

HashSet.Contains is an O(1) method, and strings have a
good hash algorithm by default, so it will be difficult
to make a faster routine than this.
Posted by: Guest on July-07-2021

Code answers related to "c# fastest way to find item in list"

Browse Popular Code Answers by Language