Without using extensions methods (LINQ). I am restricted to .NET 2.0 unfortunately. (Yeah, it sucks)
Looking for something close to O(log(n)).
Thanks for your help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To find the first key that is greater than a given key you could use the list of keys
SortedList<T>.Keysand perform a Binary Search or Interpolation Search on the keys. This will yieldO(log(n))(MSDN states that a key look up isO(1)).