solution Trees 1#1738
Conversation
Validate BST (validate_bst.py)Your solution is correct and efficient in terms of time complexity. However, there are a few points to consider:
Overall, your solution is good, but with a small optimization for early termination, it could be more efficient in cases where the invalidity is found early. VERDICT: PASS Construct Binary Tree from Preorder and Inorder Traversal (build_with_preorder_inorder.py)Your solution is correct and efficient. You have successfully implemented the recursive approach with a hashmap to optimize the search for the root index in the inorder array. Here are a few suggestions for improvement:
Overall, this is a solid implementation. Keep up the good work! VERDICT: PASS |
No description provided.