LC: 734. Sentence Similarity - spiralgo/algorithms GitHub Wiki
734. Sentence Similarity:
The Essence:
The criteria to make two sentences similar are given in the question. Then we should implement a method to check the similarity.
Details:
- We can either concatenate the pairs and use the
containsmethod of String. - Or we can leave the
similarPairslist as it is and use theequalmethod of String. The problem-solver can find both implementation here: https://github.com/spiralgo/algorithms/tree/master/src/main/java/algorithms/curated170/easy/sentencesimilarity