Finding index of lex. sorted balanced parantheses.

Правка en4, от atlasworld, 2019-05-27 13:02:35

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.

Please help!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en10 Английский atlasworld 2019-05-28 20:36:41 27 Tiny change: 'e help\n\n' -> 'e help\n\nwhy no one is replying ? \n'
en9 Английский atlasworld 2019-05-28 17:15:40 41 Tiny change: ' tell >> >\n\n\n' -> ' tell >> > [user:Errichto] Please help\n\n'
en8 Английский atlasworld 2019-05-28 07:53:55 16
en7 Английский atlasworld 2019-05-28 06:09:57 22 Tiny change: 'nd it.\n\nPlease help! \n\n\n' -> 'nd it.\n\nSomeone pls tell >> >\n\n\n'
en6 Английский atlasworld 2019-05-27 14:05:26 13
en5 Английский atlasworld 2019-05-27 14:05:00 11
en4 Английский atlasworld 2019-05-27 13:02:35 22 Tiny change: 'hind it.\ncan someone tell ! \n' -> 'hind it.\n\nPlease help! \n\n\n'
en3 Английский atlasworld 2019-05-27 12:43:09 17 Tiny change: 'hind it.\nAnyone ?\n' -> 'hind it.\ncan someone tell ! \n'
en2 Английский atlasworld 2019-05-27 12:42:32 11
en1 Английский atlasworld 2019-05-27 12:42:04 411 Initial revision (published)