Data Structures
Definition:
In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.
– the key here is that data structures use data efficiently
– different data structures are best suited to different situations
– reduces the amount of variables
What kinds of ways could you organize data?
– List
– Map
– Set
– These are known as Collections (generic term)
– List – Store bunch of items for later iteration
– Map – For a given (something) what is the (something else) – key/value
– Set – Used to maintain a unique List
List Example – Contacts
Map Example –
“Honda” -> “Civic”, “Prelude”
“Toyota” -> “Corolla”, “Celica”, “Rav4″
“Ford” -> “Focus”, “Mustang”
“Audi” -> “R8″
Set Example – Check to see which words were used in a sentence
Interesting Note: You can use one Collection inside of another
Homework:
https://www.coderscampus.com/the-5-basic-concepts-of-any-programming-language-concept-3/