98: Two sum in a binary search tree

Given a binary search tree and target sum, check if there exist two values in the tree such that their sum is equal to the given target sum

 

Example 1

Input:        4    target = 7
             / \
            2   5

Output: true

Explanation: 2 + 5 = 7

Example 2

Input:        4    target = 10
             / \
            2   5

Output: false
Difficulty:Easy
Topic:HashSet
Problem #:98