designing a library with data structures

Discussion in 'C' started by tedman, Feb 1, 2007.

  1. tedman

    tedman New Member

    Joined:
    Jan 28, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Another interview question.

    which data structure would you use to program a library, so that books can be found very fast???
     
  2. friendsforniraj

    friendsforniraj New Member

    Joined:
    Nov 24, 2006
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    studying
    i will suggest tree
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Hashing.
     
  4. tedman

    tedman New Member

    Joined:
    Jan 28, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    actually the interviewer said that it shudnt be an order n solution, that is the book should be found in the first try itself!
     
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Hashing if first try. and any array if order of n.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice