leetcode (Most Common Word)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hsx1612727380/article/details/85220442

Title:Most Common Word   819

Difficulty:Easy

原题leetcode地址: https://leetcode.com/problems/most-common-word/

1.   Set集合的唯一性

时间复杂度:O(n^2),嵌套for循环。

空间复杂度:O(n),申请了Set,最长是字符串数组的长度。

猜你喜欢

转载自blog.csdn.net/hsx1612727380/article/details/85220442