for i<j, I know the result will be 0. What about i == j?
If I use the bottom-up approach to DP, What will be the values of the main diagonal?
@Prashant-Kumar-1947183015386369 here refer this for bottom up dp explained with comments
https://ide.codingblocks.com/s/241414?_ga=2.83330646.1966381010.1589444709-2096337790.1589103777
hope the doubt is cleared if yes don’t forget to mark it resolved 
Hi Vatsal, thank you very much for the code. Everything was very nicely desribed in there.