题目要求 Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. 题目分析及思路 给定一个二叉搜索树和一个目标值,若该树中存在两个元素的和等于目标值则返回true.可以先获得树中所有结点的值列表,然后遍历每个值,判断目标值与该值的差是否也在该列表中,并保存每…