designing a library with data structures

tedman's Avatar, Join Date: Jan 2007
Go4Expert Member
Another interview question.

which data structure would you use to program a library, so that books can be found very fast???
0
friendsforniraj's Avatar, Join Date: Nov 2006
Go4Expert Member
i will suggest tree
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by friendsforniraj
i will suggest tree
Hashing.
0
tedman's Avatar, Join Date: Jan 2007
Go4Expert Member
actually the interviewer said that it shudnt be an order n solution, that is the book should be found in the first try itself!
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by tedman
actually the interviewer said that it shudnt be an order n solution, that is the book should be found in the first try itself!
Hashing if first try. and any array if order of n.