what about printing these strings onto terminal. can printing of the string is also similar. I tried to develop the algo but got messed up.can some one help?
On Aug 8, 2:53 am, Amir hossein Shahriari <[email protected]> wrote: > @ankur: dp[i][j] number of (prefix) strings that have i As and j Bs is: > dp[i-1][j] number of (prefix) strings that have i-1 As and j Bs appended by > "A" > + > dp[i][j-1] number of (prefix) strings that have i As and j-1 Bs appended by > "B" > > @ashish: wikipedia has some nice proofs for catalan number formula: > en.wikipedia.org/wiki/Catalan_number -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
