Thread: position vs rank in adt?

  1. #1
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    132

    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?

  2. #2
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    132
    It meant relative like how you have to traverse through each node in a linked list to get to a particular one.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Calculate the rank of poker game
    By Salemaccess in forum C Programming
    Replies: 3
    Last Post: 12-21-2011, 12:30 AM
  2. Help with my Taxi Rank Code
    By DP1990 in forum C Programming
    Replies: 6
    Last Post: 03-06-2011, 10:14 AM
  3. How can i rank grades?
    By Lopen007 in forum C++ Programming
    Replies: 3
    Last Post: 03-08-2008, 08:29 AM
  4. Replies: 3
    Last Post: 11-03-2002, 02:14 AM
  5. My book recommendations for rank beginners ...
    By snakum in forum C++ Programming
    Replies: 4
    Last Post: 08-21-2002, 10:38 AM