Recurring for both left and right child
else { if ( dir == ' l ' ) { findMaxBendsUtil ( node -> left , dir , bends , maxBends , soFar + 1 , len ) ; findMaxBendsUtil ( node -> right , ' r ' , bends + 1 , maxBends , soFar + 1 , len ) ; } else { findMaxBendsUtil ( node -> right , dir , bends , maxBends , soFar + 1 , len ) ; findMaxBendsUtil ( node -> left , ' l ' , bends + 1 , maxBends , soFar + 1 , len ) ; } } }