I am unable to solve some test cases, i watched hit video and there also used the same approach which i am using
link: https://ide.codingblocks.com/s/185028
hey @dhruv.160410116084 you need to make dp and ans long as the solution can overflow int.