Search found 1 match
- Tue May 25, 2010 6:02 pm
- Forum: Challenges Solved
- Topic: UpCount
- Replies: 28
- Views: 2522
I just avoided stack issues by using different values, i.e. instead of calc(11589) I ran calc(9000) and changed the code to (29574 was the result of calc(9000)): public class UpCount { private long calc(int depth) { if (depth == 9000) return 29574; long cc = calc(depth - 1); return cc + (depth % 7) ...