recategorized by
9,379 views
4 4 votes

Number of comparisons required for an unsuccessful search of an element in a sequential search organized, fixed length, symbol table of length L is

  1. L
  2. L/2
  3. (L+1)/2
  4. 2L

3 Answers

Best answer
12 12 votes
It should be L only. Here symbol table is implemented as a sequential search table. So, every time one has to search entire table.
selected by
4 4 votes

Since, it is "sequential search"  here "unsuccessful Search" means it should search(go through) for every element in the symbol table,

so,

given L is the length of the symbol table.

then,

for Unsuccessful search,

it is,

no.of comparisons required on average.

so, it is = L.

 

 

0 0 votes

In a sequential (linear) search:

  • The elements are checked one by one from the beginning.
  • If the search is unsuccessful, it means the element is not present in the table.
  • Therefore, the algorithm must compare with every one of the L elements before concluding that the element is absent.

 

hence, Ans (A) 

Answer:
Position:
Show:

Related questions

7 7 votes
2 answers 2 answers
8.9k
8.9k views
go_editor asked Jun 23, 2016
8,934 views
Which of the following algorithm design technique is used in merge sort?Greedy methodBacktrackingDynamic programmingDivide and Conquer
7 7 votes
5 5 answers
8.0k
8.0k views
go_editor asked Jun 22, 2016
7,987 views
Consider the following pseudocodex:=1; i:=1; while ( x <= 500) begin x:=2^x; i:=i+1; endWhat is the value of $\textsf{i}$ at the end of the pseudocode?$4$$5$$6$$7$
8 8 votes
2 answers 2 answers
15.3k
15.3k views
shivanisrivarshini asked May 31, 2016
15,326 views
Let $T(n)$ be defined by $T(1) =10$ and $T(n+1)=2n+T(n)$ for all integers $n \geq 1$. Which of the following represents the order of growth of $T(n)$ as a function of $n...
3 3 votes
2 answers 2 answers
4.3k
4.3k views
go_editor asked Jun 24, 2016
4,296 views
Logic family popular for low power dissipationCMOSECLTTLDTL