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
<amir.hossein.shahri...@gmail.com> 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 algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to