It would make a nice homework question in an undergraduate data
structures course, and there might be some applications where it
performs marginally better than the standard approach, which is a
single pointer to a single array.  To grow the array, allocate new
memory twice as large as the existing, copy the contents, change the
pointer, and free the old.  Amortized copying costs are O(1) per array
element.  Indexing, normally by far the most frequently executed
operation, is about as fast as for a fixed size array.

Reply via email to