This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Hidden stub code will pass a root argument to the function below. Complete the function to solve the challenge. Hint: you may want to write one or more helper functions. | |
The Node struct is defined as follows: | |
struct Node { | |
int data; | |
Node* left; | |
Node* right; | |
} | |
*/ | |
bool checkBST(Node* root) { |