ONLY 21 CASEA ARE PASSEA.S,
AND MY CODE IS : https://ide.codingblocks.com/s/257645
1373. Maximum Sum BST in Binary Tree(LEETCODE)
Hey,you have not considered the case when subtree involving root is not bst but any of its child or any of its child child is bst.
I have made some changes to your code.I have attached my complete code as well,incase you have any doubt, you can look at it.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.