Order of linear search, Data Structure & Algorithms

a. In worst case the order of linear search is O (n/2)

b. Linear search is more competent than Binary search.

c. For Binary search, the array must be sorted in ascending order only.

Write down the Binary search algorithm where the array is sorted in descending order.

Posted Date: 4/11/2013 5:30:22 AM | Location : United States

Related Discussions:- Order of linear search, Assignment Help, Ask Question on Order of linear search, Get Answer, Expert's Help, Order of linear search Discussions

Write discussion on Order of linear search
Your posts are moderated
Related Questions
explain the prims''s algorithm with suitable example?

DEPTH FIRST SEARCH (DFS) The approach adopted into depth first search is to search deeper whenever possible. This algorithm frequently searches deeper through visiting unvisite

Djikstra's algorithm (named after it is discovered by Dutch computer scientist E.W. Dijkstra) resolves the problem of finding the shortest path through a point in a graph (the sour

As we have seen, as the traversal mechanisms were intrinsically recursive, the implementation was also easy through a recursive procedure. Though, in the case of a non-recursive me

Q. Write down the binary search algorithm and trace to search element 91 in following given list: 13          30          62           73         81         88             91


Q. Write down an algorithm to merge the two sorted arrays into the third array. Do  not perform the sort function in the third array.                           Ans: void m

After going through this unit, you will be able to: • define and declare Lists; • understand the terminology of Singly linked lists; • understand the terminology of Doubly

Define the term array. An array is a way to reference a series of memory locations using the same name. Each memory location is represented by an array element. An  array eleme

Decision Tree A decision tree is a diagram that shows conditions and actions sequentially and therefore shows which condition is to be considered first, second and so on. It is