The solution given uses
$size to check that the intersection of the
cast array is greater than zero. Next, it has us filtering the result to include only those values for which the computation is
Why not use just compute the intersection as a new projected field (
labor_of_love) and then use the first hint given in the exercise to check that his is a non-empty array by using
@jcarlosgarcia: I followed this approach and got the correct answer. I see no advantage to the official solution over mine. Any comments are appreciated.
< deleted >