用hash,键是word,值是word的索引的数组。
然后我们双重循环word1和word2两个数组,找出最小值即可。
Last updated 4 years ago
Was this helpful?