Imagine you are developing a C program to manage a library's book inventory. What data structure would be beneficial for storing information about each book?

  • Array
  • Binary Search Tree
  • Hash Table
  • Linked List
A hash table would be efficient for storing information about each book in the library's inventory. It allows for fast retrieval of book details based on a unique key (e.g., book ISBN or title). This data structure provides constant-time average lookup, making it suitable for efficient management of the library's book inventory.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *