Monday, 26 March 2012

Traversal with Linear, Binary and Sorting Search


Traversal:-  Traversal is the act of processing each element of the array one after the other.

          Note:- 
                 We consider a number of search techniques for finding large amount of data elements to retrieve a particular piece of information. There are some simple techniques for searching. These are-

Linear Search:-
          In linear search, each element of an array element is compared one by one with the given ITEM to ne searched. Until either the desired element is found or the end of the list is reached. This method, which traverses the array sequentially to locate the given ITEM is called linear search.

Binary Search:-
          Binary search is a searching technique in which each comparison either locates an item for the target value or divides the remaining list in half. The array in a binary search must be first put in order.

Sorting:-
          Arrays are convenient for storing many forms of data, because they allow the access of the entry using its index.

No comments:

Post a Comment