1
00:00:00,550 --> 00:00:08,320
Let's now discuss the time and space complexity of the tabulation approach that we have just now discussed.

2
00:00:08,590 --> 00:00:15,940
The time complexity of this solution is going to be of the order of N, because notice that we are iterating

3
00:00:15,940 --> 00:00:19,000
from two up to five to find f of five.

4
00:00:19,000 --> 00:00:21,580
So we are doing almost n operations.

5
00:00:21,580 --> 00:00:24,970
So that's why the time complexity is O of n.

6
00:00:24,970 --> 00:00:32,830
The space complexity of this solution is also of the order of n, because we have to create this one

7
00:00:32,830 --> 00:00:35,230
dimensional table, which is an array.

8
00:00:35,230 --> 00:00:39,100
So that's why the space complexity is also of the order of n.
