Solved! Leetcode 1214. Two Sum BSTs

Solved! Leetcode 1214. Two Sum BSTs
source: https://leetcode.com/problems/two-sum-bsts/ Two Sum BSTs Description Given the roots of two binary search trees, root1 and root2, return true if and only if there is a node in the first tree and a node in the second tree whose values sum up to a given integer target. Example 1: Input: root1 = [2,1,4], root2 = ...

Check if a binary tree is BST

Title: A program to check if a binary tree is BST or not Source: www.geeksforgeeks.org A binary search tree (BST) is a node based binary tree data structure which has the following properties. • The left subtree of a node contains only nodes with keys less than the node’s key. • The right subtree of ...