Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   designing a library with data structures (http://www.go4expert.com/forums/designing-library-data-structures-t2794/)

tedman 1Feb2007 08:26

designing a library with data structures
 
Another interview question.

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

friendsforniraj 3Feb2007 20:27

Re: designing a library with data structures
 
i will suggest tree

shabbir 4Feb2007 08:02

Re: designing a library with data structures
 
Quote:

Originally Posted by friendsforniraj
i will suggest tree

Hashing.

tedman 5Feb2007 11:25

Re: designing a library with data structures
 
actually the interviewer said that it shudnt be an order n solution, that is the book should be found in the first try itself!

shabbir 5Feb2007 12:24

Re: designing a library with data structures
 
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.


All times are GMT +5.5. The time now is 19:59.