The problem can be solved by applying the formula for catalan number i.e (2n!)/((n!)*(n+1!)).
How ? Can you explain ?