Question d’entretien chez Amazon

Compare and Book and a Three Ring Binder using data structures and classes.

Réponses aux questions d'entretien

Utilisateur anonyme

23 févr. 2011

A book is like an array. You can very easily look up based on index (page number), however it is hard to insert (you'd have to cut out pages, put one in, and put pages back in). A binder has a more difficult lookup, but insertions are easy (like an unsorted list)

2

Utilisateur anonyme

25 janv. 2011

Book would have a class pages, and page numbers. You would use an Array to store all pages of the book in an ordered sequence. Binder would also have the class pages, but you would use a linked list to add or remove pages at anytime.