From 888449ec9f913585c4faf95acfae1dbf4e30fc4e Mon Sep 17 00:00:00 2001 From: kamyu Date: Sun, 18 Sep 2016 20:53:02 +0800 Subject: [PATCH] Update frog-jump.py --- Python/frog-jump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/frog-jump.py b/Python/frog-jump.py index 550ca5f82..c11f538f8 100644 --- a/Python/frog-jump.py +++ b/Python/frog-jump.py @@ -80,7 +80,7 @@ def canCross(self, stones): def findJumpStones(stones, i): jump_stones = [] if i == 0: - if stones[1] == 1: + if stones[1] == stones[0] + 1: jump_stones.append(1) else: for k in (i-1, i, i+1):