Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the Ex_1_1_16.java print 311361142246? #2

Open
ghost opened this issue Jul 22, 2015 · 2 comments
Open

Why the Ex_1_1_16.java print 311361142246? #2

ghost opened this issue Jul 22, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 22, 2015

Hello:
In the Ex_1_1_16 Java code, I don't understand why the result is 311361142246??The question is to examine what?
Can you explain it for me ? :)

@vettukal
Copy link

First of all note the return type is String. So everything is appended to each other.
So the expansion takes place as follows:
exR1(6)
exR1(3) +6+ exR1(4)+ 6
exR1(0)+3+exR1(1)+3+ +6+ exR1(1)+4+exR1(2)+4 +6
"" +3+ exR1(-2)+1+exR1(-1)+1 +3+ +6+ exR1(-2)+1+exR1(-1)+1 +4+ exR1(-1)+2+exR1(0)+2 +4+6
3+1+1+3+6+1+1+4+2+2+4+6

@ghost
Copy link
Author

ghost commented Jul 22, 2015

Nice, thanks for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant