data structure with variable capacity(not a linked list)
Is there any advantage of using a data-structure with the following characterstic:
the number of elements that can be inserted depends on the sequence of inputs. That is the number of elements that the data structure can hold will be different for the following sequence, 1,2,3,4,5,6,7 2,1,4,6,5,7,3 And does there exists any such data structure? Though linked list has varying capacity but its storage capacity doesn't vary with the sequence in whic h the no.'s are entered. |
A 'linked list' does what you're looking for.
Dave |
What do you exactly mean by this:
Quote:
Quote:
Shouldn't this be: "Varying capacity depending on the number of items" ? If I'm right here, your need a linked list. If not, what do you mean? |
All times are GMT -5. The time now is 10:40 PM. |