What is a good teaching example/application for jagged arrays (2d arrays with irregular row lengths)? We are teaching an AP CS class and the topic of 2d-arrays is coming up. There are plenty of cool and approachable sample applications for standard rectanglular arrays - matrix math, MIDI music, sudoku, connect-4, game-of-life, etc....

However, it's hard to think of examples for 2d-arrays with non-uniform row lengths, aka "jagged" or "ragged" arrays. Here's a simple example: 

{{1,2,3},
 {4,5},
 {6,7,8,9}
}

The ideal example would be simple or common enough for students to have the intuition for the task, but interesting enough to see how irregular-sized rows can be useful and even natural in certain situations.

Some ideas we've already floated but am not yet convinced I love: Pascal's triangle/Plinko, graphs represented with adjacency lists.

Addendum: Many good ideas so far. One clarification - I would love examples that would NOT be better implemented as an array of lists; adjacency lists for graphs, for example, are likely better that way.
Hmm, here are a few ideas:


Calculating student GPA where the grades are all stored in an array of arrays, and the different semesters have different numbers of courses.
Make a lookup table of prime factors.
Consider an array of arrays of paths to hike, and local maximum / local minimum elevations passed along the way. Since there will be a different number of local maxima/minima along the way, the array will naturally be jagged.  Figure out which hiking path involves the least climbing.
Same as above, but now instead store the elevation every x number of meters.  Since the hiking paths are somewhat different lengths, the array will naturally be jagged.  Determine which path has the lowest average slope for a hiker who has difficulty with hills.
(More advanced than AP, probably) Many Sudoku variants often suggest jagged arrays.


Also, for what it's worth, if you organize your midi-like events by time, it's actually ragged.  Different numbers of notes are played (or stop playing) at different times.  If you play a triad, you will have three events.  If you play a triad at the same time as you stop playing a previous melodic note, you now have four events.