HI Everyone out there,Hope this post find you in best of your spirits.Yesterday I was attempting this SPOJ Problem here.I got the idea instantly that the state of dp will be defined as dp[node][flag] where flag denotes whether ticket has to be bought for this node or not.But I am having a hard time implementing it... Can somebody please help me in its implementation.Thanks and Have a nice day.