Skip to content

Instantly share code, notes, and snippets.

@alyssoncs
alyssoncs / gist:f0b89a185b4954af2976f43afef7e849
Created April 24, 2018 16:53
Is This a Binary Search Tree?
/* 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) {