In the way identify_favorite_movies is implemented, the whole favorites list is being rebuilt each time function is called. And previous list is deleted node by node.
For efficiency, wouldn't it be better to have a pointer in each list (previous favorites and history list) and check movies one by one to see if it exists in favorites already? (and if not, create a new node in favorites list?)