Frage im Vorstellungsgespräch bei Meta

Write an algorithm to verify if a tree is a binary search tree

Antworten zu Vorstellungsgespräch

Anonym

28. Juli 2018

check if root >= left and root <= right and isBST(root.left) and isBST(root.right) checking if any node is null.

Anonym

6. März 2019

Do in-order traversal, ensuring that the next node value you see is greater than current node value.