Learn how to use a key instead of an index to access your data with an associative array. Discover how you can organize your data with key-value pairs in an associative array.
- So far, we've looked at many different data structures.…We looked at arrays, which store items continuously,…and each item is accessed through an index.…We also looked at linked lists,…which use nodes and pointers…to connect one element to the next.…We traversed either forward…or backward through the data structure.…Then, we looked at stacks and queues,…which didn't have an index but we were able to easily pop…and push items on top of the stack or enqueue…and dequeue items in the queue.…
With this new data structure,…we'll get a tool called a key…that allows us to access our data in a meaningful way.…With arrays, when we assessed an index,…usually that index didn't have any meaning.…It didn't matter whether the value 32 was…at index two or index four.…There was no relationship between the index…and the value associated with it.…We just needed a way to store it in the data structure…and access it quickly.…Now we can give meaning to the way we store…and access it through a key.…
Let's say I wanted to store…all the capitals of the United States.…
- Data types: Booleans, numbers, strings, and more
- Multidimensional arrays
- Jagged arrays
- Search and sort arrays
- Linked lists
- Stacks and queues
- Hash functions and hash tables
- Trees and graphs
Skill Level Intermediate
Understand data structures1m 25s
1. Introduction to Data Structures
4. Stacks and Queues
5. Hash-Based Data Structures
6. Trees and Graphs
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.