Database Reference
In-Depth Information
Listing 4.4. Finding movies that have been seen by John's friends but not by John
You've added another step to the traversal algorithm. First, you discovered which movies
John has already seen
, then used the standard Java Collections API to remove John's
moviesfromtheoriginalcollection
.Ifyourunthecodefrom listing 4.4 ,you'llgettwo
results, as expected:
Found movie: Alien
Found movie: Heat
You finally have code that works as a simple recommendation engine—recommending
movies that have been seen by the user's friends, but not by the user.
 
Search WWH ::




Custom Search