I draw a space here; I can’t find him unless I really notice something under my nose.
I am trying to save an int list in a data structure.
But after I add them, I will check the code later if an int already exists in the list.
A generic List<int> performs an O (n) operation with its Contains() .
I want something that works as fast as Dictionary<> Contains() , which does the O (1) operation because it hashes keys.
I know that the answer is so simple and that I worked too long today, I can’t remember it.
Help!
Beemerguy
source share