Driver code to test above methods
public static void main ( String args [ ] ) { Node root = new Node ( 1 ) ; root . left = new Node ( 2 ) ; root . right = new Node ( 3 ) ; root . right . left = new Node ( 4 ) ; root . right . right = new Node ( 5 ) ; root . left . left = new Node ( 1 ) ; System . out . print ( getMaxSum ( root ) ) ; } }