Machine-translated by Google. Questions are authored in English.
Top

Discussion

A linear list implementation of a symbol table has lookup cost

  • A.proportional to the square of the entry count
  • B.proportional to the number of entries in the table
  • C.constant regardless of how many entries there are
  • D.proportional to the logarithm of the entry count

Answer: B

Every entry may have to be examined. The simplicity is attractive for a very small table, but the cost becomes unacceptable once a program declares more than a handful of names. Real programs declare thousands, so the structure is of historical interest only.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.