fb pixel

Plagiarism detection

You are trying to implement a plagiarism detection system for essays. The first thing to consider is the number of unique words that occur in the first essay that is also present in the second one. You decide to quickly implement that feature and move on to more elaborate ones.
The first line of the input contains the first essay. The second line contains the second one.
The program should print the number of unique words (words are separated by a space in both essays) that are present in both essays.
Hello I am Tyler, I really love programming
Hello I am Michael, I really love machine learning

Explanation: There are 5 unique words that are present in both sentences: Hello, I, am, really, love.
To check your solution you need to sign in
Sign in to continue