Solved 4.5 check if a binary tree is a BST, by flatten the tree into a stack and check if the stack is monotonous.