Given a binary tree and a nuber k , print all nodes that are k distant from a leaf
int printKDistantfromLeaf ( Node node , int k ) { if ( node == null ) return - 1 ; int lk = printKDistantfromLeaf ( node . left , k ) ; int rk = printKDistantfromLeaf ( node . right , k ) ; bool isLeaf = lk == - 1 && lk == rk ; if ( lk == 0 || rk == 0 || ( isLeaf && k == 0 ) ) Console . Write ( " ▁ " + node . data ) ; if ( isLeaf && k > 0 )