Skip to content

Conversation

@SandersLin
Copy link
Contributor

a simple dp problem seen on LeetCode:

>>> climb_stairs(1)
1
"""
assert isinstance(n,int) and n > 0, "n needs to be positive integer, your input {0}".format(0)
Copy link
Member

@cclauss cclauss Jul 11, 2019

Choose a reason for hiding this comment

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

You can drop the zero inside the {} and you can replace the last zero with n.

Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

Thanks. Nice contribution with doctests!

@cclauss cclauss merged commit 1e55bfd into TheAlgorithms:master Jul 15, 2019
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
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.

2 participants