We are to find the index of lexographically sorted balanced brakcet sequence.
I was referring to cpalgorithms, but couldn't understood,
while calculate the index number when we get ")" , why we are adding dp[2*n-i-1][depth+1] to our answer. what is the intution behind it.
Someone pls tell >> > Errichto Please help
why no one is replying ?
-_-
Solve problems on your level, not something much above it. You didn't even name it correctly. Get back to this problem after you are, say, 1600+ and you solved many dp problems.