今際の国の呵呵君
Sunday, October 28, 2018
[LeetCode]Sentence Similarity
这道题similarity不是传递的,我们只要在hash map中建立对应的关系即可,注意一个字符可能有多个映射。时间复杂度O(N),空间复杂度O(N),代码如下:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment