注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 lotustree86 于 2016-3-2 03:53 编辑
刚刚结束的FB 电面
Problem 1: check if a BT is a BST
Problem 2: Given a set of Tree Nodes, find if they form a single valid BST, if so return the root
Example:
Nodes : (Node1, Node 2)
Tree structre:
Node1
/
Node2
In this case, return Node1.
Nodes : (Node1, Node 2)
Tree structre:
Node1
/
Node3
In this case, return null
PS(发错版面了,如何改到面经版?)
|