@Anand: it depends on how you think of i
i thought of it as the starting digit of a group but you're thinking of it
as it's last
however both views are correct here since you're talking about my solution
minus 2!
you need to initialize the dp to 0 (and a bit change in IFs so that you
don't refer to a negative index in a[] )
but for my solution (after changing the init value of i to n-2) setting
dp[n-1]=dp[n]=dp[n+1]=0 would be enough

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to