1.

The ____________ pattern identifies each node in the tree as stops in a round-trip traversal of the tree.(a) Materialized Paths(b) Array of Ancestors(c) Nested Sets(d) None of the mentionedThis question was addressed to me by my college director while I was bunking the class.My question is from Model Tree Structures in portion Data Models of MongoDB

Answer»

The correct choice is (C) NESTED Sets

To elaborate: The Nested Sets pattern stores each tree node in a document; in addition to the tree node, document stores the id of node’s PARENT, the node’s initial STOP in the left field, and its return stop in the RIGHT field.



Discussion

No Comment Found

Related InterviewSolutions