Skip to content

mincostClimbingStairs and majorityElement#652

Merged
GeekUniversity merged 1 commit intoalgorithm001:masterfrom
FollowMyHeart:master
May 13, 2019
Merged

mincostClimbingStairs and majorityElement#652
GeekUniversity merged 1 commit intoalgorithm001:masterfrom
FollowMyHeart:master

Conversation

@FollowMyHeart
Copy link
Contributor

还是选着两个比较简单的算法题做了,其他难度高的感觉有些难啃,要花一些事情去想。找众数这个题用到一个哈希表记录数字出现的次数。遍历整个列表一次记录次数,再遍历哈希表找出众数。求爬楼梯花费最小的这个题目使用到动态规划的知识。

Copy link
Contributor

@tidelgl tidelgl left a comment

Choose a reason for hiding this comment

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

没有注释吗?

@@ -0,0 +1,7 @@
class Solution:
def minCostClimbingStairs(self, cost: List[int]) -> int:
Copy link
Contributor

Choose a reason for hiding this comment

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

非常简洁,要是加些注释就好了

@GeekUniversity GeekUniversity merged commit 2c14b5b into algorithm001:master May 13, 2019
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

Successfully merging this pull request may close these issues.

3 participants