Learn how we can hold arrays within arrays with a multidimensional array. Understand how to calculate the number of rows or columns with the indices of a multidimensional array so that you can iterate through the data structure.
- Since arrays are container objects and data structures,…they don't have to just hold primitive types.…We can actually have containers within containers.…If we go back to our movie theater example,…we can actually represent all the seats in a movie theater…with something called a multidimensional array.…Before, our array only worked for one row of seats,…but with a multidimensional array,…we can add the dimension of a column.…This means that our multidimensional array…actually holds arrays inside of it.…Keeping this in mind, we can actually…apply this idea to other examples.…
Say you're planning a dinner where guests have to…choose between three options for their appetizer…and three options for the main course.…To store this information in code,…we can use a multidimensional array.…We'll have one array that stores our appetizers…and another array that stores our main courses.…This is just like our movie theater example…in that our appetizers are like one row…and the main courses are another row.…Essentially, we will be grouping our appetizers…
- 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.