Thread: To Recur(sion) or to Iterate?That is the question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User jasrajva's Avatar
    Join Date
    Oct 2001
    Posts
    99

    Question To Recur(sion) or to Iterate?That is the question

    Hi people

    i suppose
    Recursion can always be translated into iteration
    any comments??

    also recursion is also often the inefficient way to solve aproblem but sometimes it is the most intuitive way

    for eg
    to traverse a bin tree recursion is by defn of the traversal (
    Left Root Right
    or any combination of the above)

    is very intuitive(to me atleast)

    so when should i use recursion and when iteration?

    That is The Question

    (Sorry Bill Shakespeare i regret having mangled your words but..
    couldnt resist )
    Last edited by jasrajva; 11-07-2001 at 09:45 AM.
    jv

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. iteration and recursion question
    By Stonehambey in forum C++ Programming
    Replies: 3
    Last Post: 03-19-2008, 06:16 PM
  2. simple recursion question
    By salvadoravi in forum C Programming
    Replies: 4
    Last Post: 12-30-2007, 07:53 AM
  3. Design layer question
    By mdoland in forum C# Programming
    Replies: 0
    Last Post: 10-19-2007, 04:22 AM
  4. Recursion vs multiple functions
    By PJYelton in forum C++ Programming
    Replies: 4
    Last Post: 12-29-2002, 08:52 PM
  5. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM