@Pranav -
Your greedy solution fails. Sample test case - 7*0+0*7+7 :)
DP is the way to go for this.
-Swapnil
--
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
@Nikhil - Not sure on what you mean by O(8). And O(1) doesn't work
anyway.
-Swapnil
--
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
@Snehal -
Please avoid posting problems that have been solved somewhere else
already. That decreases the value of this group. More people will be
active here if we see new problems.
Hope you get the point, no offence intended.
-Swapnil
--
You received this message because you are subscribed