Largest BST in a BT

https://ide.codingblocks.com/s/243661. Can you pls tell why my code isn’t working for all the test cases

hello @Tushar-Goel-1587999611286693
there is logical error in ur code.
u can merge left / right subtree in ur current node only when
left/right subtree is bst itself and data of current node is greater than maximum value of left subtree and smaller than the minimum value in right subtree.

pls refer this article-> https://www.geeksforgeeks.org/largest-bst-binary-tree-set-2/

Thanka a lot, I didnt consider the point that every element in left subtree must be less than the current node and same for right subtree