list/a=list(3000)
return a.Find(text)
Problem description:
I'm assuming this is O(n). Is there a way to turn this into O(log n) or lower if this is a sorted text list?
I was thinking about some possible implementations, but if you have 3000 or so elements, isn't it time to switch to a sorted list? What should I do?
Or, if you want a really fast look-up, you can add data like