position vs rank in adt?
I'm reading about the abstract data type sequences and it says they are a union of linked list and vectors meaning they have both rank and position. The book says "A position of an element is defined
relatively (i.e., in terms of its neighbors)". Could someone elaborate or give an example please?
It meant relative like how you have to traverse through each node in a linked list to get to a particular one.
This link has a brief overview of the two: http://www.cs.jhu.edu/~cohen/CS226/L...VecListSeq.pdf.
Basically, position means you locate an element through a next/previous type of mechanism (sequential access), like a linked list. Rank is akin to array index (random access), where you can get to any element directly.