Below is my solution for this problem. When I try to print out the number of ways in the helper function, it shows the correct number. But I couldn't get that value returned. I changed my helper function from void to int and return it in the climbStairs function, but it still doesn't pass the test. Any suggestions on why my solution wouldn't work? Thanks
@syl read about passing by value vs reference?
in context of c#, primitive types like int, string passed by value and lists/classes etc passed by reference(address).. even though ways is updated inside the Helper function, you are not passing it back to the calling function.. C# provides ref keyword to pass by reference which is a value type (there should be something similar in java)