IBM Interview Question

what are the time complexity of the given code(dynamic programming codes where asked)