Google Searching


Jumat, 09 Maret 2012

Searching the Data Structure

Searching is a search method in the data structure. Search within this data structure is a job most basic programming.
Sequential searching is a linear search method is a linear search berurutan.Metode quite easy to implement in a program.Metoda writing this using the beginning of the end of the left and then make a comparison of each of the existing elements with a search element. if it is found, the search function to an end and will generate value True.Sementara if the element in question was not found until the end of an array then the search will end with the absence of such elements in the array and the function will generate value in False.Dalam searching methods This array or rows of values must be sorted first dahulu.Karena have ordered then we know that we are looking for elements that have greater value than the elements in the array list designated by index.kita not need to search further because we are looking for elements that would not be we find in the rest of the array that allows the search ada.Ini faster progress when we look for elements in the front of the array list ada.tentu just the opposite: if the element in question is dai end of the array list.
Binary SearchAdalah Searching a method in the conventional manner of the search always starts from the left end of the array where it was at the show by the initiation of the object index with a value of 0. Next we do a search array to perform a search array to the end of the array is reached. To understand how the Binary Search works, imagine when we try to guess the number within a range from 1 to 100 are sequences given to a friend kita.misalkan for each guess that we make, our friends would say we guessed right, too small or too big. The best guess at the beginning of 50 if his guess is too high then we should figure out 25, while if too large a guess our next 75. Every time we always chose to guess at the center by adjusting the lower limit and upper limit of the number.


Related Posts Plugin for WordPress, Blogger...

Mobi Info


Lazada Promo