StackRox interview question

Graph search,BST validity