Hi,
could you tell me why top - down solution is o(n^2) time complexity ?
my understanding is worst case would be linked list
then f(n) = o(n) + f(n-1) = o(n^2).
Please confirm
thanks.

@Dylan.Qiu
It's because the last method memorizes the results of the subproblems via a dict when it first encounters, and thus duplicate subproblems are not recomputed. Therefore it outperforms the first method.