difficulty in choosing algorithm for similarity checker software : I am planning to build a project for final year that is similar to similarity checker.
In the project, I am planning to check the similarity percentage among the submitted assignments i.e offline.

For example:
1) When first student submits assignment, it is not checked with any other assignments.
2) When second student submits assignment, it is checked with the first assignment.
3) When third student submit assignment, it is checked with first and second submitted assignments.
4) Similarly if there are 35 students than the 36th submitted assignment is checked with rest 35 submitted assignments.

Now, here comes the question that how to compare two assignments.
In this case comparison is similarity between the texts in the documents.
I want the result similar to this:

[![Similarity checking between the documents][1]][1]


  [1]: https://i.stack.imgur.com/jmQ9W.jpg


I just want to show percentage of similar sentences and what they are?

What I did:

I studied different algorithms like td-idf, cosine similarity algorithm but I am unable to correctly interpolate the results of algorithm.

so, I want to know which algorithm is best in this situation and I want know how this is done. Is there any references to any sites, blogs that would help me??
