I am working on this problem https://leetcode.com/problems/climbing-stairs and getting an error 'global name helper is not defined'. But it is defined in the class?
class Solution(object):
def climbStairs(self, n, ):
"""
:type n: int
:rtype: int
"""
return helper(0, n)
def helper(self, curr, n):
if (curr > n):
return 0
if (curr == n):
return 1
return helper(curr + 1, n) + helper(curr + 2, n)