Driver code
public static void Main ( String [ ] args ) { Node root = new Node ( - 2 ) ; root . left = new Node ( - 3 ) ; root . right = new Node ( 4 ) ; root . left . left = new Node ( 5 ) ; root . left . right = new Node ( 1 ) ; root . right . left = new Node ( - 2 ) ; root . right . right = new Node ( - 1 ) ; root . left . left . left = new Node ( - 3 ) ; root . right . right . right = new Node ( 2 ) ; Console . Write ( " Maximum ▁ Spiral ▁ Sum ▁ = ▁ " + maxSpiralSum ( root ) ) ; } }