Learn how to store uneven and unparallel data with a jagged array. Understand the differences between an array, a multidimensional array, and a jagged array.
- You've seen a multidimensional array…where the size of each inner array is the same.…There's another type of array…called a jagged array.…It's a little more flexible because its elements…can be order different dimensions and sizes.…Let's do a quick review.…Here's a diagram of an array.…With this, we have a one-dimensional array…with three items.…To make it two-dimensional array…we add another dimension by adding another array,…making this have two dimensions.…
Each array in this data structure…has three columns or three slots.…Each array is the same size.…The length of the first row…is the number of columns…and the length of the two-dimensional array…is the number of rows.…The smaller pairs inside of each box…indicate the indices used to access that slot.…Now a jagged array would look something like this.…Here, each array within the data structure…can be of a different length.…The first array or first row has three elements,…the second has two elements, and so on.…
With a jagged array, the number of columns is not fixed,…
- 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.