Is it true that a recursive procedure call inside a loop is a bad decision? Do I need to separate cycles and recursive calls?
Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants user194374, Kromster , rjhdby , vp_arth , Denis Bubnov Mar 1 '17 at 6:11
The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .
|
1 answer
Wrong. The statement is unreasonable. Analogy ... What's worse - call the procedure a hundred times in a loop, or make 10 recursive calls for 10 each? The use of the stack in this case can be safely neglected. A good solution is one that implements the necessary functionality without an unreasonably large overhead projector. IMHO.
|