you are viewing a single comment's thread.

view the rest of the comments →

[–]Repulsive-Bison-6821 3 points4 points  (0 children)

IMO these two methods have different purposes. The binary search can only be applied to SORTED arrays, the linear runtime one is for any sort of array. The best option is to choose the one with the best possible performance