answersLogoWhite

0


Best Answer

Sequential search of an object with in an array of objects is called as linear search.

User Avatar

Wiki User

2012-05-11 01:43:26
This answer is:
User Avatar
Study guides

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What do unix and Linux have in common

➡️
See all cards
3.95
61 Reviews

Add your answer:

Earn +20 pts
Q: Explain linear search with an example?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Explain the different searching techniques in c?

Linear SearchBinary Search


What is linear search algorithm?

The linear search algorithm is a special case of the brute force search.


What are ten advantages of linear search?

There no advantages to linear search other than searching for the first (or last) nodes. Linear search takes linear time with an average O(n/2) for each search.


What is linear searching?

The linear search algorithm is a special case of the brute force search.


What is linear sequential model explain briefly?

explain advantages and disadvantages of linear sequencial model?


What are advantage of linear searching?

There no advantages to linear search other than searching for the first (or last) nodes. Linear search takes linear time with an average O(n/2) for each search.


What is the running time of a linear search of an array?

Running time of a linear search is O(n)


When is linear search better than binary search?

When binary search is not possible. For example: unsorted data, data with variable length, only sequentially accessible data (tape).


Complexity of linear search?

the compexity of linear search in worst case is f(n) = n+1


What are the advantage of binary search on linear search?

It are the speed.


What are the Advantages of binary search on linear search in c?

A binary search runs in O(log n) time, compared to linear search's O(n) time. What this means is that the more elements are present in the search array, the faster a binary search will be (on average) compared to a linear search. As an example, given 100 elements, a binary search will discover the item using no more than 7 iterations, while a linear search will require up to 100 iterations; going to up 1000 elements requires only up to 10 iterations, compared to linear search's 1000 maximum iterations. The downside to binary search, however, is that it only operates on a sorted array, which means the data must be pre-sorted using some means.


What are the disadvantages of linear search?

1)in linear search it needs more space and time complexity. 2) in linear search if the key element is the last element and the search is from first element that is a worst case, or if the key element is the first element and the search is from last element then also is the worst case.

People also asked

The best way to please a woman?

View results

What is the front of a building called?

View results

How much electricity does a solar panel produce in a day?

View results

When is the best time to plant for spring flowers?

View results

What is an example of a sentence with facade?

View results

When is it the best time to plant flowers in Virginia?

View results