Skip to content
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

【009-week1】算法训练营第一周学习总结 #34

Open
duoyuli opened this issue Jun 9, 2019 · 0 comments
Open

【009-week1】算法训练营第一周学习总结 #34

duoyuli opened this issue Jun 9, 2019 · 0 comments

Comments

@duoyuli
Copy link
Contributor

duoyuli commented Jun 9, 2019

第一周算法训练营学习总结

  • 与题无关的一些感悟

从业务侧写代码的习惯来说,首先是可阅读性强,可扩展性强,并且还需要横向纵向兼容(纵向是指同接口向上兼容,横向是指服务边界方面的兼容),为了部分平衡可以牺牲部分性能。所以上来会使用一些设计模式去套路一下。刷 LeetCode 上来有时候一下就会想多,导致思绪混乱,后续有切换过来。

  • 与题有关的一些感悟

LeetCode 的题如此简洁,就是实现功能,所以理解题是一个很重要的阶段。在理解题以后,有时候一下没有任何思路,有些懵逼(此处确实需要多练习)。在理解题以后,写代码的过程中不断去修正,如何把时间/空间复杂度降低一些,循环的减少,变量的复用(以及看他人的解法)都是手段之一。在刷题过程中,还有一点就是原子逻辑的抽离,可能使用一个最简逻辑实现,在逻辑的调用处做适当的变形,达到整理逻辑的简化。

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

No branches or pull requests

1 participant