Leetcode 653 - Two Sum IV - Input is a BST

Note:

• Use inorder to get a sorted array then use double pointers.

Question:

Given the root of a Binary Search Tree and a target number k, return true if there exist two elements in the BST such that their sum is equal to the given target.

Example:

Code: