Pergunta de entrevista da empresa Arista Networks

Verify a BST

Respostas da entrevista

Sigiloso

24 de mar. de 2012

remember and update max and min when you go down the tree

Sigiloso

23 de abr. de 2012

Go breadth first and make sure left node < right node. That verifies the BST property at each level.

Sigiloso

25 de jun. de 2012

Do an inorder traversal and see if the values are sorted, if they are it is a BST else not.

1