CSC365 Compiler Design and Construction

Compiler Design and ConstructionModel question

What is a symbol table? Compare different data structures for implementing symbol table: Linear list Hash table Binary search tree Which is most efficient and why? Show hash table implementation for…

5

What is a symbol table? Compare different data structures for implementing symbol table:

  • Linear list
  • Hash table
  • Binary search tree

Which is most efficient and why?

Show hash table implementation for storing the following identifiers using hash function h(x) = (sum of ASCII values) mod 7:

Identifiers: {sum, count, avg, total, temp}

Use chaining for collision resolution.

A worked answer is on its wayMeanwhile, read the Compiler Design and Construction notes for this topic.

Discussion

Loading…

More Compiler Design and Construction questions

All Compiler Design and Construction old questions