CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

In general, in recursive and non-recursive implementation of a problem (program)

A
Time complexity is better in recursive version but sapce complexity is better in non-recursive version of the program
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Space complexity is better in recursive version but time complexity is better in non-recursive version of the program
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Both time and space complexities are better in non-recursive than in recursive program
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Both time and space complexities are better in recursive than in non-recursive program
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C Both time and space complexities are better in non-recursive than in recursive program
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 implementaion gives worst case scenario too. So, recursive implementation does not guarantee for best case all the time.
So, option (B) is correct.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Introduction
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon