SPOJ CODEM5 - Problem5 , DP


#1

Hi,
I am trying to solve CODEM5 - Problem5, it is a tutorial problem. I am getting SIGSEGV . Please Help

My Solution to problem –

Problem Link –


#2

Check the while loop condition

col>0 && row>=0

when row = 0

if( subset[row-1][col]==true && row>0)         
         row--;

subset[row-1] = subset[-1]