In his dream, Chris coded a recursive function in Python :
1 2 3 4 5 |
|
Which of the following, when substitute to
_
in the
line will lead to an infinite loop for some integer parameter
?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
the return value is 3 + something. so i checked what happened if n=3.
_ = 4 will result in return 0 -> no problem
_ = 3 will result in return 0 -> no problem
_ = 2 will again result in return 3+something -> might cause a problem
but big values for n will cause a problem for 3 and 4 too.