1 vote

Maximum Sum BST in a Binary Tree

Beyond method naming and a comment stating what the signature boolean isBST(TreeNode root,…) suggest, the code gives no indication what it is there for, what the ...
greybeard's user avatar
  • 6,286
1 vote

Maximum Sum BST in a Binary Tree

Is there anything I can change, in the same given code, that would optimize it and/or get it accepted? Your “Time Limit Exceeded” question is basically asking “when is this code slow?” We tend to ...
J_H's user avatar
  • 21.7k

Only top scored, non community-wiki answers of a minimum length are eligible