Function to calculate total number of nodes of degree d in these trees .
function numberOfNodes ( n , d ) { let ans = binomialCoeff ( 2 * n - 1 - d , n - 1 ) ; document . write ( " " + " " + " " + ans + " " ) ; return 0 ; }