阅读背景:

在C文件上运行二进制搜索的最快方法?

来源:互联网 

For example, let's say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste of time to copy the entire file into an array and then run binary search...I've effectively made it a linear time algorithm, because I'll have to spend O(n) time copy the darn file before I can run my search.For example, let's say I want to find a particu




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: