Know About the Inventory Data Structure!
Inventory data structure is a makeover of a matrix data structure. Often we encounter tasks where we have keywords and their associated properties. Consider like we have 5 items and each item has associated 10 properties, we want to put them in a table and then perform some operations on it.
A matrix is too tedious for that and a hash table is too much. We need a simpler table to capture this data and give us a platform to do the operations. For this reason comes the inventory data structure.
Essentially, it’s a table with keywords and properties. It supports the operations like get all keywords, all properties, search, add new keyword etc.
The motive of inventory table is to hold the data with keywords and properties. So the design is intuitive. Figure below explains the structure of the table.
It’s a 3D string array where memory is dynamically…
View original post 53 more words