When to use List <T> .BinarySearch?
Common List<T>in .NET has a method BinarySearch(). BinarySearch()- An efficient search algorithm for large data sets. I think I read that if everyone in the world were listed in the phone book, then a binary search could find any person within 35 steps. At what point should I use BinarySearch()on Listas opposed to using the standard .Wherelambda clause? How big should the data set be before switching from Whereto BinarySearch? Or is he Wherealready using binary search behind the scenes?
+4
2 answers