I’ve been a four-star programmer a few times. Imagine a blocked symmetric matrix where the rows and columns are indexed by triples (u,v,w). The entries are zero whenever u != u’ or v != v’, and because of symmetry you only store entries with w <= w’. But the range of v depends on the value of u and the range of w on the value of v. So you do
and weep a little. In reality, this gets a bit optimized by allocating a single chunk of memory and carving that up into the pointer and data arrays, so everything is reasonably close together in memory.