Segmentation error
@tushaartiwari1997 u cant initialize dp with int max directly you can only assign 0 so have to do it using for loop here take a look https://ide.codingblocks.com/s/235437
i hope your doubt is resolved if yes dont forget to mark it as resolved