Skip to content

add solution 0952 #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 15, 2018
Merged

add solution 0952 #132

merged 8 commits into from
Dec 15, 2018

Conversation

biubiubiubiubiubiubiu
Copy link
Contributor

新手上路,请多指教~

@yanglbme
Copy link
Member

明天上午我仔细看一下哈~现在关电脑睡觉了。

@yanglbme
Copy link
Member

yanglbme commented Dec 15, 2018

@biubiubiubiubiubiubiu 感谢提交,我刚刚仔细看了你的 commit 内容,代码写得很规范,很棒。但是我在 README 文档中发现有诸多与之前模板不一致的地方。在这里我列举一些出来,希望你可以细心改一下哈~不然这样整个项目风格不统一,维护起来很困难。

  • 标题不应该 带序号并加.
  • 每一级标题和层级结构与之前设定的不一致。
  • 示例下方的输入输出这一整块内容,请用 ``` ``` 包起来,可读性更好。
  • 图片不用第三方图床,直接将图片复制到本项目 img 文件夹下,并用相对引用即可。比如,你的图片是 hello.png,放在 img 文件夹下,引用的时候,直接用 markdown 语法,如 ![hello](/img/hello.png) 即可,我们不依赖第三方图床,都放 GitHub 上,很方便,也不会失效。

你可以参考 @Mrtj2016 这位老哥的提交,比如这个,你可以直接 copy 一份,然后每一题对应的 标题/描述/示例/解法 做个替换。其实这位老哥一开始就做的很规范,我很快就把他加入本项目的 Collaborators 中,提交时直接 push,不用发 PR,我们共同维护好这个项目。

如果你认可我提出的这些小建议,可以修改之后再提交过来~我再进行 Review。

😄 期待你也能加入项目的 Collaborators 中。

}
```

但是这个代码其实会超时,因为中间的遍历逻辑会耗费很长的时间,时间复杂度为 O(n^2)。因此我们需要更快一点的解法。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

时间复杂度,请写为 O(n²),更直观哈。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好,非常感谢你的意见,我已经修改了新的一版上去,还有什么问题也烦请指出。谢谢啦

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biubiubiubiubiubiubiu 好的,我已经看到你的修改了。之后如果有要修改的地方,争取所有地方都修改完,检查 okay 之后再 commit,就不要为一道题提交了 8 次啦 😅。

@yanglbme yanglbme added the need optimization Improvement request label Dec 15, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@yanglbme yanglbme merged commit b1b0d01 into doocs:master Dec 15, 2018
@yanglbme
Copy link
Member

@biubiubiubiubiubiubiu 😁期待你做得越来越好~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need optimization Improvement request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants