if the value at node is 1 then its count will be considered including the maximum of leftCount or the rightCount
if ( root . data == 1 ) return Math . max ( l , r ) + 1 ; else return Math . max ( l , r ) ; }