answersLogoWhite

0


Best Answer

10 80 03 09 55 32 100 07 05 02 12 65 63 22 92

10 is found at index 0

05 is found at index 8

76 is not found

85 is not found

200 is not found

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Hand simulate the sequential search algorithm on the data set given below and the search elements being 10 05 76 85 200 Data set 10 80 03 09 55 32 100 07 05 02 12 65 63 22 92?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

The time complexity of the sequential search algorithm is?

O(N) where N is the number of elements in the array you are searching.So it has linear complexity.


How does sequential search work?

In computer science, linear search or sequential search is a method for finding a particular value in a list, that consists of checking every one of its elements, one at a time and in sequence, until the desired one is found.[1]Linear search is the simplest search algorithm; it is a special case of brute-force search. Its worst case cost is proportional to the number of elements in the list; and so is its expected cost, if all list elements are equally likely to be searched for. Therefore, if the list has more than a few elements, other methods (such as binary search or hashing) will be faster, but they also impose additional requirements. (Source: Wikipedia)


A binary search of an orderd set of elements in an array or a sequential search of the elements.Which one is faster?

A binary search is much faster.


What algorithm uses a loop to step through each element of an array starting with the first element searching for a value?

What you're describing is called a sequential search or linear search.


What is the average number of comparisons in a sequential search?

If this is a homework related question, you really should consider trying to solve it yourself before looking at this answer. Otherwise, the value of the lesson, and the reinforcement provided by the assignment, will be lost to you. In a sequential search, where the elements are in a uniformly random distribution, the average number of comparisions to find a particular element is one half of the number of elements. Stated another way... In a sequential search, where the elements are in an arbitrary distribution, the average number of comparisions to find a random element is one half of the number of elements.


What is search algorithm?

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


Which are the searching algorithm always compare the middle element with the searching elements in the given array?

binary search system


What is searching. With the help of illustrative examples describe sequential search and binary search Develop the algorithms for the same.?

Searching of algorithm is finding an item with specified properties among a collection of items. The items may be stored individually as records in a database; or may be elements of a search space defined by a mathematical formula or procedure, such as the roots of an equation with integer variables; or a combination of the two, such as the Hamiltonian circuits of a graph A Binary Search is a technique for quickly locating an item in a sequential list. A Sequential Search is a procedure for searching a table that consists of starting at some table position (usually the beginning) and comparing the file-record key in hand with each table-record key, one at a time, until either a match is found or all sequential positions have been searched. BY PANKAJ BHATT (warrior2pnk)


Which search algorithm requires that the arrays contents be sorted?

Binary Search Algorithm


Can you use a sequential search on an unsorted array?

Sequential search is the only way to search an unsorted array unless you resort to a multi-threaded parallel search where all threads concurrently search a portion of the array sequentially.


Which algorithm is preferable to find a specific number from unsorted array?

If the array is unsorted then there is no algorithm that can be applied other than a sequential traversal from one end of the array to the other until the number is found or the end of the array is reached. This is an extremely poor algorithm as the worst case would be O(n) for n elements. While this may be fine for small arrays, it is highly inefficient for larger arrays. To apply a more efficient algorithm with a worst case of O(log n), you must sort the array. You can then use a binary search algorithm by starting at the middle element. If that's your value, you're done. If not and the value you seek is less than this value, then you can eliminate all the elements in the upper half of the array, otherwise you can eliminate all the elements in the lower half of the array. Repeat the process with the remaining subarray, reducing the number of remaining elements by half each time. If you end up with a subarray with no elements then the value does not exist. Sorted arrays that are perfectly balanced offer the best performance. For instance, an array with 63 elements is perfectly balanced because after the first iteration you are left with another perfectly balanced array of 31 elements (because you eliminated 31 elements plus the middle element). After the next iteration you will be left with 15 elements, then 7, 3, 1 and finally 0. Thus a 63-element array takes no more than 6 iterations to determine that a value does not exist, compared to 63 iterations with a sequential traversal search upon an unsorted array. 6 iterations is also the average because the 6th iteration can locate any one of 32 values, which is more than half the values.


Explain linear search with an example?

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