searching an important and recurring problem in computing is that of locating information more succinctlythis problem is known as searching this is good topic to use for preliminary exploration of the various issues involved in algorithm design requirements for searching clearlythe information to be searched has to first be represented (or encoded somehow this is where data structures come in of coursein computereverything is ultimately represented as sequences of binary digits (bits)but this is too low level for most purposes we need to develop and study useful data structures that are closer to the way humans thinkor at least more structured than mere sequences of bits this is because it is humans who have to develop and maintain the software systems computers merely run them after we have chosen suitable representationthe represented information has to be processed somehow this is what leads to the need for algorithms in this casethe process of interest is that of searching in order to simplify matterslet us assume that we want to search collection of integer numbers (though we could equally well deal with strings of charactersor any other data type of interestto begin withlet us consider the most obvious and simple representation two potential algorithms for processing with that representation as we have already notedarrays are one of the simplest possible ways of representing collections of numbers (or stringsor whatever)so we shall use that to store the information to be searched later we shall look at more complex data structures that may make storing and searching more efficient supposefor examplethat the set of integers we wish to search is { , , , , , , , , we can write them in an array as [ if we ask where is in this arraythe answer is the index of that element if we ask where isthe answer is nowhere it is useful to be able to represent nowhere by number that is not used as possible index since we start our index counting from any negative number would do we shall follow the convention of using the number - to represent nowhere other (perhaps betterconventions are possiblebut we will stick to this here