Abstract data types naming convention: (Dynamic) Array, Vector, Sequence, List, Container, Buffer

StackOverflow https://stackoverflow.com/questions/21286537

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?

Était-ce utile?

La solution

That's called a Dynamic Array.

Autres conseils

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)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top