Question

Let's consider the (arguably) most famous of all data structures which

  • provides an add or append allowing to add data in (amortized) constant time (at one end of the collection), and
  • provides O(1) indexing

Obviously we are all familiar with this concept: In Java we would call it an ArrayList, in C++ probably a vector, in Python it is "a list", in Scala an ArrayBuffer etc.

My question is: What is the most appropriate term to refer to the abstract data type behind these implementations, i.e., which term would (or should?) be associated with the mentioned complexities by all programmers irrespective of their individual background/language?

Was it helpful?

Solution

That's called a Dynamic Array.

OTHER TIPS

I think it should be the term List. While the term is more general than what you seem to be looking for I don't know of another word with a similiar meaning in this context.

The literature calls it like that, too.

Also wikipedia: http://en.wikipedia.org/wiki/List_%28abstract_data_type%29 (they don't say a List needs an access / insertion / delete time of O(1) though)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top