Skip to content
Related Articles

Related Articles

UGC-NET | UGC NET CS 2015 Dec – II | Question 15
  • Last Updated : 01 May, 2018

In general, in a recursive and non-recursive implementation of a problem (program) :
(A) Both time and space complexities are better in recursive than in non-recursive program.
(B) Both time and space complexities are better in non-recursive than in recursive program
(C) Time complexity is better in recursive version but space complexity is better in non-recursive version of the program.
(D) Space complexity is better in recursive version but time complexity is better in non-recursive version of the program.


Answer: (B)

Explanation: In general, in a recursive and non-recursive implementation of a problem (program) both time and space complexities are better in non-recursive than in recursive program. In some program recursive implementation gives worst case scenario too. So, recursive implementation does not guarantee for best case all the time.
So, optipon (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :