Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

TechTip: Some Uses for Recursion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TechTip: Some Uses for Recursion

    ** This thread discusses the article: TechTip: Some Uses for Recursion **
    ** This thread discusses the Content article: TechTip: Some Uses for Recursion **
    0

  • #2
    TechTip: Some Uses for Recursion

    ** This thread discusses the article: TechTip: Some Uses for Recursion **
    Recursion is definitely one of the more fun programming techniques. Sometimes, recursion is the obvious first solution to some tough programming problem. But one general principle of recursion is that there's always an iterative solution that's more efficient. In the INCR case, note that we have an example of "tail recursion". That is, the recursive call is one of the last things done in the procedure. Such a recursive procedure is easy to convert into a faster, iterative procedure by coding a loop around the code. Cheers! Hans

    Comment

    Working...
    X