Getting 0 as output


i tried of solving the code with bottom up approach but getting 0 as answer in every test case, please correct my code and tell me the mistakes that i done in my code