We need to find the distance between two nodes in Binary Tree with one bent. Let L=> Left R=>Right .
Bent actually denotes LLLLLLLRRRRR in this case there is only one bent , LLLRRRLLLL there is two bent,
RRRRRLLLLL only one bent .
.Find max distance between any two nodes of a binary tree with at most a single bent.

'''
public class SingleBent {static class TreeNode { int val; TreeNode left; TreeNode right; } static int max = Integer.MIN_VALUE; public int bent(TreeNode root) { return Math.max(max, bentUtil(root.left, false) + bentUtil(root.right, true)); } private int bentUtil(TreeNode root, boolean b) { if (root == null) return 0; int left = bentUtil(root.left, false); int right = bentUtil(root.right, true); max = Math.max(max, left + right ); return b ? right : left; }
}
'''