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

【026-week2】算法训练营第二周学习总结 #127

Open
hhf666feng opened this issue Jun 16, 2019 · 0 comments
Open

【026-week2】算法训练营第二周学习总结 #127

hhf666feng opened this issue Jun 16, 2019 · 0 comments

Comments

@hhf666feng
Copy link
Contributor

  1. 本周主要练习哈希表和二叉树,大多数上周已经练习过,所以大多数题目做下来比较轻松,基本都能一遍过,五毒神掌确实好用。

  2. 哈希表主要特性是,插入和查找复杂度为O(1),用空间换时间,一般用来降低算法的时间复杂度

  3. 二叉树一般是考察深度遍历和广度遍历,熟记模板,一般题目都可以过

  • 二叉搜索树,熟记定义和特性:
    • 非空左子树所有节点小于根节点
    • 非空右子树所有节点大于根节点
    • 任意节点的左右子树均为二叉搜索树
    • 中序遍历为递增数列
  • 实际写题目时还是要注意,容易写成左右节点跟根节点的比较,做leetcode 98题验证二叉搜索树时,自己就犯了这个错误
  1. Leetcode 220题比较有难度,一般的算法复杂度O(n*k),最后一个用例会超时,这题有深入研究的同学帮忙给个比较好的解法思路
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