Pergunta de entrevista da empresa Salesforce

Can you find if a tree is a BST?

Resposta da entrevista

Sigiloso

10 de ago. de 2020

Recursively go down each branch see if the left value is lower and the right value is higher. If at any point you find that the condition is false, then the tree is not a BST, otherwise, it is a BST.