You are on page 1of 1

Property Recursion Iteration

A set of instructions repeatedly


Definition Function calls itself. executed.

Application For functions. For loops.

Through base case, where When the termination condition


there will be no function for the iterator ceases to be
Termination call. satisfied.

Used when code size


needs to be small, and Used when time complexity
time complexity is not an needs to be balanced against an
Usage issue. expanded code size.

Code Size Smaller code size Larger Code Size.

Very high(generally Relatively lower time


Time exponential) time complexity(generally polynomial-
Complexity complexity. logarithmic).

You might also like