Pregunta de entrevista de Microsoft

Write a function to check if a given binary tree is a valid binary search tree.