retagged by
2,126 views
3 votes
3 votes
which  DS takes less time to create Symbol table???

a) Hash Table

B) Linked List

is there is any other method to create Symbol table??

what are the various option available to create symbol table? among which takes less time???
retagged by

1 Answer

0 votes
0 votes

In symbol table, we would insert the data at once and would have to perform a large number of search.

Hash table would be the best option as it is simply generating a hash of your key object and using that to access the target data.

  • Linked lists (unsorted)
    • low complexity to implement
    • inserts are O(1)
    • lookups are O(N)
  • Hash tables
    • high complexity to implement
    • inserts are O(1) on average
    • Lookups O(1)

Related questions

3 votes
3 votes
1 answer
1
Xylene asked Aug 8, 2017
1,549 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
2
dd asked Dec 13, 2016
3,711 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
3
dd asked Dec 13, 2016
2,575 views
Which of the following symbol table implementation is based on the property of locality of reference?Search TreeHash TreeSelf-organizing ListArray
2 votes
2 votes
1 answer
4
Akriti sood asked Dec 8, 2016
12,152 views
Which of the following symbol table implementation is based on the property of locality of reference? Self-organizing list Hash tree Search tree Array