This is based on standard result also known as Catalan number :
a) Number of BSTs(binary search trees in which position of keys matter) = Number of unlabelled binary trees of n vertices
= 2nCn / (n+1)..
As in the case of labelled binary trees , the order of keys do not matter , so they can be arranged in any way So number of binary trees = Number of unlabelled binary trees of n vertices * n!
= 2nCn / (n+1) * n!
Here n = 3,
So , number of labelled binary trees = ( 6C3 / 4 ) * 3!
= 5 * 6
= 30
Hence 30 should be the correct answer..