Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This chapter deals with the fundamental operation of searching for data stored in an array in cases where data are unordered and where they are ordered. The requirement to search for data stored in arrays led to the development of algorithms for linear and binary searches.
We discussed the concept of program efficiency and the efficiency of algorithms for common operations. The term Big O denotes efficiency as a measure of work done on a given volume of data, and we developed the O( ) function for linear and binary searches; this demonstrates the greater efficiency of the latter when used with ordered data sets.