Largest Binary Search Tree in Binary Tree

The sample test is giving correct output but the actual test cases are not.
https://ide.codingblocks.com/s/59976 1
Please help

check line number 60 u will find ur error