notice thatjust before the innermost version returns there are actually five different incarnations of triangle(in existence at the same time the outer one was passed the argument the inner one was passed the argument characteristics of recursive methods although it' shortthe triangle(method possesses the key features common to all recursive routinesit calls itself when it calls itselfit does so to solve smaller problem there' some version of the problem that is simple enough that the routine can solve itand returnwithout calling itself in each successive call of recursive method to itselfthe argument becomes smaller (or perhaps range described by multiple arguments becomes smaller)reflecting the fact that the problem has become "smalleror easier when the argument or range reaches certain minimum sizea condition is triggered and the method returns without calling itself is recursion efficientcalling method involves certain overhead control must be transferred from the location of the call to the beginning of the method in additionthe arguments to the method and the address to which the method should return must be pushed onto an internal stack so that the method can access the argument values and know where to return in the case of the triangle(methodit' probable thatas result of this overheadthe while loop approach executes more quickly than the recursive approach the penalty may not be significantbut if there are large number of method calls as result of recursive methodit might be desirable to eliminate the recursion we'll talk about this issue more at the end of this another inefficiency is that memory is used to store all the intermediate arguments and return values on the system' internal stack this may cause problems if there is large amount of dataleading to stack overflow recursion is usually used because it simplifies problem conceptuallynot because it' inherently more efficient mathematical induction recursion is the programming equivalent of mathematical induction mathematical induction is way of defining something in terms of itself (the term is also used to