Vivek loves array game :


can u please tell me why my top down dp is giving tle .

@sjduttabbsr2017
I’ve mentioned issues in the code
See here https://ide.codingblocks.com/s/230623

But A[ i ] can be 0 ; don’t you think there would be multiple instances where the left sum == right sum

@sjduttabbsr2017
Only where a consecutive sequence of values is zero
But even in that case since zeros don’t contribute anything to sum anywhere
You can just call recursion on subparts there and then