What are jagged arrays for?

I already know, or rather read, what they are good for, but I don’t understand.

Rigid arrays are useful for modeling sparse data structures where you can't always allocate memory for each element if it won't be used

Can anyone please help me understand this? and imagine examples and real-life situations where you are making decisions and weighing the use of jagged arrays against something else like arrays.

+3


source to share





All Articles