Ada-C11 / array_or_hash

How we organize our data matters. Different structuring of data allows for optimizing different algorithms for common methods on the data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Array or Hash

How we organize our data matters. Different structuring of data allows for optimizing different algorithms for common methods on the data. Examples of common methods on data include: sorting the data based on a criteria, looking up information for a specific data set, adding data, deleting data etc.

Exercises

  • Consider the example we looked at with the Student Account Generator exercise There are various different ways to organize this data. Let's scope our attention down to two options. Take some time to consider the pros and cons of these two options:
  1. as an Array of hashes
  2. as a Hash of hashes
  • [Optional] Take some time to understand the linked code showing student account generator as an array of hashes and as a hash of hashes.

About

How we organize our data matters. Different structuring of data allows for optimizing different algorithms for common methods on the data.


Languages

Language:Ruby 100.0%