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