atlasworld's blog

By atlasworld, history, 3 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

3 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.

  • »
    3 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    ok , but i don't think problem is hard,just one step is not explained in tutorial.