Skip to content

LeetCode题解动态规划找硬币 #930

Open
@hannatao

Description

@hannatao

当amount为0时,期望返回结果为0,当前代码返回为-1。
在程序开始应该加入判断
if (amount == 0) { return 0; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug错误

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions