ORID51

作者: Wilbur_ | 来源:发表于2020-08-14 07:59 被阅读0次

    今天在Jeff Erickson 的algorithm里面看到了对recursion的一个很好的解释:
    • If the given instance of the problem is small or simple enough, just solve it.
    • Otherwise, reduce the problem to one or more simpler instances of the same problem.

    While it's tempting to think about how all those smaller disks get moved -- in other words, what happens when the recursion is unfolded -- it's not necessary. In fact, for more complicated problems, unfolding the recursive calls is merely distracting. Our only task is to reduce the problem to one or more simpler instances, or to solve the problem directly if such reduction is impossible.

    8月进度更新
    我要做的一个project改为了Javascript的一个项目,目前已经完成。下面就应该把更多的精力放到刷题上面去。这样能够准备好未来的面试。

    这几周一直在参加每日挑战。我觉得对自己还是很有帮助的,至少养成了每天做一道题的习惯,无论在什么情况下。这样也很好。但是我发现我有时候简单题却做不出来。
    思路是有的,但是没法实现出来。我觉得这就是自己自己功底不好了。我觉得你需要多加锻炼自己实现意图的能力。
    就比如有一天的每日挑战。让你实现一个简单的HashSet,我觉得这确实是一个计算机学生的基础,因为hashset在很多地方用到的东西太多了。所以能够实现一个简单的hashset是你的一个基本功。这还是要记下来。我觉得这道题有必要重复练习,至少了解清楚java 底层原理,或者说能够把abstract data type (ADT) 实现出来的方法。
    现在记录一个列表,就是自己需要练习的题目
    1 - 705. Design HashSet
    2 - 415. Add Strings
    3 - 1536. Minimum Swaps to Arrange a Binary Grid
    4 - wordbreak II
    5 - https://en.wikipedia.org/wiki/Trie
    https://en.wikipedia.org/wiki/Bubble_sort#:~:text=Bubble%20sort%2C%20sometimes%20referred%20to,until%20the%20list%20is%20sorted.
    https://courses.cs.washington.edu/courses/cse373/13wi/lectures/02-11/HashSet.java
    https://ojeveryday.com/#/check
    https://leetcode.com/problems/minimum-swaps-to-arrange-a-binary-grid/discuss/?currentPage=1&orderBy=most_votes&query=

    相关文章

      网友评论

          本文标题:ORID51

          本文链接:https://www.haomeiwen.com/subject/wrkkdktx.html