摘要: 方法一:若是bst,中序便利后一定是有序,递增的。可以中序遍历后查看是否递增来判断 1 class Solution { 2 public: 3 bool isValidBST(TreeNode *root) { 4 5 if... 阅读全文
posted @ 2015-01-21 12:57 穆穆兔兔 阅读(161) 评论(0) 推荐(0) 编辑