1.

________ returns a set with elements that appear in any of the input sets.(a) $setIntersection(b) $setDifference(c) $setEquals(d) $setUnionThe question was posed to me at a job interview.The question is from Pipeline Optimization in division Aggregation Concepts and Aggregation Mechanics of MongoDB

Answer»

Right answer is (d) $setUnion

The best I can explain: $setUnion PERFORMS SET OPERATION on arrays, treating arrays as sets.



Discussion

No Comment Found

Related InterviewSolutions