position vs rank in adt?

This is a discussion on position vs rank in adt? within the Tech Board forums, part of the Community Boards category; I'm reading about the abstract data type sequences and it says they are a union of linked list and vectors ...

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

    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
    116
    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,488
    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-20-2011, 11:30 PM
  2. Help with my Taxi Rank Code
    By DP1990 in forum C Programming
    Replies: 6
    Last Post: 03-06-2011, 09:14 AM
  3. How can i rank grades?
    By Lopen007 in forum C++ Programming
    Replies: 3
    Last Post: 03-08-2008, 07:29 AM
  4. Replies: 3
    Last Post: 11-03-2002, 01: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21