Skip to content

Commit

Permalink
Update candy.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 committed Oct 23, 2014
1 parent 1cd80f8 commit 086f733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/candy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Solution:
# @param ratings, a list of integer
# @return an integer
def candy(self, ratings):
candies = [1 for i in range(len(ratings))]
candies = [1 for _ in xrange(len(ratings))]
for i in xrange(1, len(ratings)):
if ratings[i] > ratings[i - 1]:
candies[i] = candies[i - 1] + 1
Expand Down

0 comments on commit 086f733

Please sign in to comment.