Skip to content

算法训练营(上海站)第四周作业 #164

Open

Description

@GeekUniversity

要求

每周至少完成给定题目中的两道算法题
围绕每周重点学习的算法知识点,撰写一篇有观点和思考的技术文章(字数不限)

注意事项

下面列出的题目中,按照知识点进行了简单分类,但并不意味着使用相应的数据结构或算法一定是解决该题目的最优解,这样分类只是为了方便大家有针对性的练习;
有的题目可能需要结合多个算法或数据结构进行求解。

第四周题目

Trie树

简单:https://leetcode-cn.com/problems/longest-word-in-dictionary/
中等:https://leetcode-cn.com/problems/implement-trie-prefix-tree/
中等:https://leetcode-cn.com/problems/add-and-search-word-data-structure-design/
困难:https://leetcode-cn.com/problems/word-search-ii/

分治算法

简单:https://leetcode-cn.com/problems/majority-element/
中等:https://leetcode-cn.com/problems/maximum-subarray/
中等:https://leetcode-cn.com/problems/search-a-2d-matrix-ii/

贪心算法

简单:https://leetcode-cn.com/problems/assign-cookies/
中等:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/

回溯算法

简单:https://leetcode-cn.com/problems/letter-case-permutation/
中等:https://leetcode-cn.com/problems/subsets/
中等:https://leetcode-cn.com/problems/permutations/
中等:https://leetcode-cn.com/problems/combinations/
困难:https://leetcode-cn.com/problems/n-queens/

动态规划

简单:https://leetcode-cn.com/problems/climbing-stairs/
中等:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/
困难:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iv/
困难:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iii/
简单:https://leetcode.com/problems/house-robber/
中等:https://leetcode.com/problems/house-robber-ii/
中等:https://leetcode.com/problems/house-robber-iii/
中等:https://leetcode.com/problems/unique-paths/
中等:https://leetcode.com/problems/unique-paths-ii/

作业提交规则

在提交作业之前,请先阅读这里的 README 文档:
https://github.com/algorithm002/algorithm/blob/master/README.md
然后在此 Issues 下按照如下格式回复:

#作业提交
学号:
username:
代码作业:(填写自己仓库下对应的作业链接即可,同时记得给本仓库提交 pull request)
学习总结:发表自己本周的学习感言 issues,并提交链接,issues 标题格式:“【学号后三位-week1】+文章标题”,格式参考:#1
使用语言:

Activity

  1. James-Ren commented on Jun 29, 2019

    @James-Ren
    Contributor

    #作业提交
    学号:010
    username:James-Ren
    代码作业:https://github.com/James-Ren/algorithm/tree/master/Week_04/id_10
    学习总结:#197
    使用语言:Go

  2. UCSBGauchos commented on Jun 30, 2019

    @UCSBGauchos

    #作业提交
    学号:008
    username:UCSBGauchos
    代码作业:https://github.com/UCSBGauchos/algorithm/tree/master/Week_04/id_8
    学习总结:#200
    使用语言:Java

  3. rocinn commented on Jun 30, 2019

    @rocinn
    Contributor

    #作业提交
    学号:007
    username:Yrp1994
    代码作业:https://github.com/Yrp1994/algorithm/tree/master/Week_04/id_7
    学习总结:#249
    使用语言:C#

  4. jianyuewu commented on Jun 30, 2019

    @jianyuewu
    Contributor

    #作业提交
    学号:041
    username:jianywu
    代码作业:https://github.com/jianywu/algorithm/tree/master/Week_04/id_41
    学习总结:#203
    使用语言:CPP

  5. liveForExperience commented on Jun 30, 2019

    @liveForExperience
    Contributor

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

  6. hiveryeah commented on Jun 30, 2019

    @hiveryeah
    Contributor

    #作业提交
    学号:023
    username:Eva
    代码作业:https://github.com/hiveryeah/algorithm/tree/master/Week_04/id_23
    学习总结:#206
    使用语言:Java

  7. hiveryeah commented on Jun 30, 2019

    @hiveryeah
    Contributor

    #作业提交
    学号:010
    username:James-Ren
    代码作业:https://github.com/James-Ren/algorithm/tree/master/Week_04/id_10
    学习总结:#197
    使用语言:Go

    DP截图部分灰常受用,赶脚可以把套路记下来,变成自己的O(1) 解题记忆。

  8. jianyuewu commented on Jun 30, 2019

    @jianyuewu
    Contributor

    #作业提交
    学号:010
    username:James-Ren
    代码作业:https://github.com/James-Ren/algorithm/tree/master/Week_04/id_10
    学习总结:#197
    使用语言:Go

    DP截图部分灰常受用,赶脚可以把套路记下来,变成自己的O(1) 解题记忆。

    本以为Majority的Boyer-Moore 投票算法已经够骚了,没想到还有更骚的map解法,赞

  9. lection commented on Jun 30, 2019

    @lection
    Contributor

    #作业提交
    学号:003
    username:lection
    代码作业:https://github.com/lection/algorithm-1/tree/master/Week_04/id_3
    学习总结:#207
    使用语言:Python

  10. lection commented on Jun 30, 2019

    @lection
    Contributor

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    就等着你的总结了,这么详细的总结,比我自己做题都带劲。以后没有作业了,不知道去哪里看总结了。。。

  11. HugoWen commented on Jun 30, 2019

    @HugoWen
    Contributor

    #作业提交
    学号:006
    username:HugoWen
    代码作业:https://github.com/HugoWen/algorithm-1/tree/master/Week_04/id_6
    学习总结:#209
    使用语言:PHP

  12. HugoWen commented on Jun 30, 2019

    @HugoWen
    Contributor

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    每周都来学习下你的总结~

  13. HugoWen commented on Jun 30, 2019

    @HugoWen
    Contributor

    #作业提交
    学号:010
    username:James-Ren
    代码作业:https://github.com/James-Ren/algorithm/tree/master/Week_04/id_10
    学习总结:#197
    使用语言:Go

    714题二维数组的dp解法和贪心算法自己做都没有想到,学习了

  14. HugoWen commented on Jun 30, 2019

    @HugoWen
    Contributor

    #作业提交
    学号:008
    username:UCSBGauchos
    代码作业:https://github.com/UCSBGauchos/algorithm/tree/master/Week_04/id_8
    学习总结:#200
    使用语言:Java

    455题代码好简洁

  15. 164 remaining items

  16. Jerrydreamaker commented on Jul 14, 2019

    @Jerrydreamaker
    Contributor

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    你这个爬楼梯解法,确实不错,。

    好认真啊,做了这么多道题,还一道题多种解法,厉害。

    总结得很仔细,向你学习。

  17. confidence93 commented on Jul 15, 2019

    @confidence93
    Contributor

    #作业提交
    学号:010
    username:James-Ren
    代码作业:https://github.com/James-Ren/algorithm/tree/master/Week_04/id_10
    学习总结:#197
    使用语言:Go

    好多思路

  18. confidence93 commented on Jul 15, 2019

    @confidence93
    Contributor

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    学习了

  19. confidence93 commented on Jul 15, 2019

    @confidence93
    Contributor

    #作业提交
    学号:007
    username:Yrp1994
    代码作业:https://github.com/Yrp1994/algorithm/tree/master/Week_04/id_7
    学习总结:#249
    使用语言:C#

    C#看起来学习曲线好高

  20. confidence93 commented on Jul 15, 2019

    @confidence93
    Contributor

    #作业提交
    学号:023
    username:Eva
    代码作业:https://github.com/hiveryeah/algorithm/tree/master/Week_04/id_23
    学习总结:#206
    使用语言:Java

    厉害

  21. confidence93 commented on Jul 15, 2019

    @confidence93
    Contributor

    #作业提交
    学号:003
    username:lection
    代码作业:https://github.com/lection/algorithm-1/tree/master/Week_04/id_3
    学习总结:#207
    使用语言:Python

    代码挺简洁的

  22. confidence93 commented on Jul 15, 2019

    @confidence93
    Contributor

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    总结非常详细,厉害

    厉害厉害

  23. confidence93 commented on Jul 15, 2019

    @confidence93
    Contributor

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    解法真的很棒

  24. swelily commented on Jul 15, 2019

    @swelily

    #作业提交
    学号:023
    username:Eva
    代码作业:https://github.com/hiveryeah/algorithm/tree/master/Week_04/id_23
    学习总结:#206
    使用语言:Java

    简单粗暴的解法,我喜欢,哈哈。

    代码中用到位运算学习了

  25. swelily commented on Jul 15, 2019

    @swelily

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    脑图画的不错啊, 收藏了,回头借鉴下哈。

    脑图画的好

  26. swelily commented on Jul 15, 2019

    @swelily

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    钦佩你的总结

    总结写得不错

  27. swelily commented on Jul 15, 2019

    @swelily

    #作业提交
    学号:010
    username:James-Ren
    代码作业:https://github.com/James-Ren/algorithm/tree/master/Week_04/id_10
    学习总结:#197
    使用语言:Go

    好多思路

    一题多解

  28. swelily commented on Jul 15, 2019

    @swelily

    #作业提交
    学号:018
    username:liveForExperience
    代码作业:https://github.com/liveForExperience/algorithm/tree/master/Week_04/id_18
    学习总结:#205
    使用语言:Java

    就等着你的总结了,这么详细的总结,比我自己做题都带劲。以后没有作业了,不知道去哪里看总结了。。。

    总结写得很详细!

  29. kaye-liu commented on Apr 10, 2020

    @kaye-liu

    要求

    每周至少完成给定题目中的两道算法题
    围绕每周重点学习的算法知识点,撰写一篇有观点和思考的技术文章(字数不限)

    注意事项

    下面列出的题目中,按照知识点进行了简单分类,但并不意味着使用相应的数据结构或算法一定是解决该题目的最优解,这样分类只是为了方便大家有针对性的练习;
    有的题目可能需要结合多个算法或数据结构进行求解。

    第四周题目

    Trie树

    简单:https://leetcode-cn.com/problems/longest-word-in-dictionary/
    中等:https://leetcode-cn.com/problems/implement-trie-prefix-tree/
    中等:https://leetcode-cn.com/problems/add-and-search-word-data-structure-design/
    困难:https://leetcode-cn.com/problems/word-search-ii/

    分治算法

    简单:https://leetcode-cn.com/problems/majority-element/
    中等:https://leetcode-cn.com/problems/maximum-subarray/
    中等:https://leetcode-cn.com/problems/search-a-2d-matrix-ii/

    贪心算法

    简单:https://leetcode-cn.com/problems/assign-cookies/
    中等:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/

    回溯算法

    简单:https://leetcode-cn.com/problems/letter-case-permutation/
    中等:https://leetcode-cn.com/problems/subsets/
    中等:https://leetcode-cn.com/problems/permutations/
    中等:https://leetcode-cn.com/problems/combinations/
    困难:https://leetcode-cn.com/problems/n-queens/

    动态规划

    简单:https://leetcode-cn.com/problems/climbing-stairs/
    中等:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/
    困难:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iv/
    困难:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iii/
    简单:https://leetcode.com/problems/house-robber/
    中等:https://leetcode.com/problems/house-robber-ii/
    中等:https://leetcode.com/problems/house-robber-iii/
    中等:https://leetcode.com/problems/unique-paths/
    中等:https://leetcode.com/problems/unique-paths-ii/

    作业提交规则

    在提交作业之前,请先阅读这里的 README 文档:
    https://github.com/algorithm002/algorithm/blob/master/README.md
    然后在此 Issues 下按照如下格式回复:

    #作业提交
    学号:
    username:
    代码作业:(填写自己仓库下对应的作业链接即可,同时记得给本仓库提交 pull request)
    学习总结:发表自己本周的学习感言 issues,并提交链接,issues 标题格式:“【学号后三位-week1】+文章标题”,格式参考:#1
    使用语言:

    #姓名:赵大宝
    #班级:前端训练营5期
    #小组:1组
    #语言:PHP
    #作业链接:https://time.geekbang.org
    #总结链接:https://time.geekbang.org
    #作业&总结链接:https://time.geekbang.org

  30. kaye-liu commented on Apr 10, 2020

    @kaye-liu

    #学号:G20200337050003
    #姓名:赵大宝
    #班级:前端训练营5期
    #小组:1组
    #语言:PHP
    #作业链接:https://time.geekbang.org
    #总结链接:https://time.geekbang.org
    #作业&总结链接:https://time.geekbang.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions