Campus Bike II | Difficulty in understanding time complexity of two approaches.

I solved Campus Bike II.

I have two implementations Bottom UP DP and
Top Down DP

Using the top down dp solution I got accepted in 3 ms and using bottom up dp it took 14ms. The time complexity of both the approach looks same to me.

I want to know why there is such a difference in their execution time.

Comments (1)