What is linear search algorithm in Data Structure? tccicomputercoaching.com
What is Search?
Search is a process of finding a value in a list of values. In other words, searching is the process of locating given value position in a list of values.
Linear Search Algorithm:
Linear Search Algorithm is used to find an element in a list of elements with O(n) time complexity where n is total number of elements in the list. This search process starts comparing of search element with the first element in the list. If both are matching then results with element found otherwise search element is compared with next element in the list. If both are matched, then the result is “element found”. Otherwise, repeat the same with the next element in the list until search element is compared with last element in the list, if that last element also doesn’t match, then the result is “Element not found in the list”. That means, the search element is compared with element by element in the list.
Engineering student and school student can learn Data Structure at TCCI.
We have experienced and Qualified faculties to teach students.
Call us @ 9825618292
Visit us @ www.tccicomputercoaching.com