摘要:
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class Solution { vector > p; ... 阅读全文
摘要:
class Solution { bool judge(vector& a, int left, int right) { if(left>=right) return true; int i=right; //此时数组的right就是根 while(i>left&&a[i-1]>a[right]) --i;... 阅读全文