Question d’entretien chez Amazon

Write a function that detects a BST