Commit 04457953 by lyn

code review

parent 8cb94955
Detailed Comments:
— 唯一摩尔斯密码词:代码逻辑完全正确
- for i in words:的循环内部,可以直接使用i,没有必要再建立一个变量inner_words
- 可以直接遍历inner_words,使用正则提取出words_letter再遍历words_letter做了重复的工作
- if words_morse not in morse_list的判断,在morse_list较大时会非常慢,时间复杂度为O(n),可以使用set进行优化
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment