mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
a7752175d6
commit
1fab1bf6b0
@ -1,10 +1,12 @@
|
|||||||
"""
|
"""
|
||||||
There is a robot on an m x n grid.
|
There is a robot on an m x n grid.
|
||||||
The robot is initially located at the top-left corner of grid
|
The robot is initially located at the top-left corner of grid
|
||||||
the robot tries to move to the bottom-right corner.
|
the robot tries to move to the bottom-right corner.
|
||||||
The robot can only move either down or right at any point in time.
|
The robot can only move either down or right at any point in time.
|
||||||
Return number of all possible unique paths robot can take.
|
Return number of all possible unique paths robot can take.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def uniquepaths(m, n):
|
def uniquepaths(m, n):
|
||||||
"""
|
"""
|
||||||
>>> uniquepaths(3,2)
|
>>> uniquepaths(3,2)
|
||||||
@ -29,4 +31,5 @@ def uniquepaths(m, n):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import doctest
|
import doctest
|
||||||
|
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
Loading…
Reference in New Issue
Block a user