retagged by
7,849 views
3 votes
3 votes

Access time of the symbol table will be logarithmic, if it is implemented by a

  1. linear list            
  2. search tree              
  3. hash table          
  4. none of the above
retagged by

2 Answers

9 votes
9 votes
A. Linear list : on average O(n/2) i.e linear complexity

B. Search tree : on aaverage O(logn) i.e. logarithmic complexity.        //Answer

C. Hash table : Perfect Hashing leads to  O(1) i.e. constant complexity.
0 votes
0 votes
I feel it should be hash table as  hashing using linear probing has a success rate of O{(1/x) *log(1/(1-x)) }

where x is load factor i.e

x = number of entries filled up / total number of places/entries  that can be  filled in table
Answer:

Related questions

3 votes
3 votes
1 answer
1
Hira Thakur asked Aug 14, 2017
2,132 views
which DS takes less time to create Symbol table???a) Hash TableB) Linked Listis there is any other method to create Symbol table??what are the various option available t...
3 votes
3 votes
1 answer
2
Xylene asked Aug 8, 2017
1,553 views
Which of the following phases update the symbol table ?Lexical analysis, syntax analysis and semantic analysis .Please also tell what kind of updates a phase performs if ...
0 votes
0 votes
3 answers
3
dd asked Dec 13, 2016
3,727 views
A symbol is a compile time data structure. In which of the following phase/s a symbol is modified ?Only semantic analysisNone of theseOnly lexical analysisLexical analysi...
0 votes
0 votes
1 answer
4
dd asked Dec 13, 2016
2,585 views
Which of the following symbol table implementation is based on the property of locality of reference?Search TreeHash TreeSelf-organizing ListArray