阅读背景:

算法(!=线性搜索)查找整数数组中第一个小于X的数

来源:互联网 

I'm looking for an algorithm to find the first number less than X in an array of integers. Actually I'm using linear search,but I think that binary search may be better(as I already have seen sometime ago) but I don't know how to implement it myself(not implement a modified version to find the first-less than X). If there is something better than bin search,please tell me. I need of it because this array is so-much accessed and modified while the program is running.I'm looking for an algorithm to find the first




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

分享到: