recursion and memory

前端 未结 5 1001
生来不讨喜
生来不讨喜 2020-12-30 11:19

I have a program that passes in huge amounts of data, say 1000 variables, through recursion. The recursion would run to atleast 50 or 60 times. What I\'m worried about is, i

5条回答
  •  隐瞒了意图╮
    2020-12-30 11:53

    There could be two cases

    1. Enough memory, recursion completes and you get ressult.

    2. Not mough memory amd get StackOverFlowError and program exits

    You will not have wrong results because of memory overwriting that does not happen

提交回复
热议问题