GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  Intel  >  Programming

 Print  |  
Question:  which takes less time to execute.? ordinary functions or recursive functions .



August 08, 2007 03:02:16 #5
 mmh   Member Since: Visitor    Total Comments: N/A 

RE: which takes less time to execute.? ordinary functi...
 
Note that the question asks which type of "function" takes less time to execute, not algorithm. While recursive algorithms generally take less time (depending on application), recursive functions have more overhead (a function call translates to several CPU instructions).

So, the answer is ordinary functions.
     

 

Back To Question