Test Cases 1 and 2 not solved

I’m not able to solve test cases 1 and 2. Please let me know the issue with this code.

Code Link: https://ide.codingblocks.com/s/671424

according to your code :

your statement is :
struct Info {

int sz, min, max, ans, isBST;

};

correct statement is :
struct Info {

int sz, max, min, ans, isBST;

};

Modified code is :

i hope this help