0
Utmost Number of Recursions in Widely Used Programing Language?
Does anyone know the number of utmost recursion depth in the following programming languages: C, C++, Java, Javascript,, etc. ( e.g. I know for python the default value is less than 1000 unless you increase it manually)
1 Odpowiedź
- 1
C/C++/Java : Depends on stack size.
The maximum recursion depth in C depends on a lot of factors, of course. On a typical 64-bit Linux system the default stack size is 8 MB, and the stack alignment is 16 bytes, so you get a recursion depth of about 512K for simple functions.
(Source: https://codegolf.stackexchange.com/a/141281)
Javascript : Depends on browser. It is usually 10000.
Python : 1000