atlasworld's blog

By atlasworld, history, 5 years ago, In English

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 ?

  • Vote: I like it
  • -8
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

-_-

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.