Ayush7614 / Daily-Coding-DS-ALGO-Practice

A open source project🚀 for bringing all interview💥💥 and competative📘 programming💥💥 question under one repo📐📐
https://daily-ds-algo.github.io/DS-Algo-Website/
MIT License
320 stars 475 forks source link

Leetcode problem: Two Sum IV - Input is a BST #974

Open sardonicankita opened 3 years ago

sardonicankita commented 3 years ago

Aim

To solve the Leetcode problem "Two Sum IV - Input is a BST in c++. Admins please assign this to me under LGM SOC'21.

Details

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.

Input: root = [5,3,6,2,4,null,7], k = 28 Output: false

Input: root = [2,1,3], k = 4 Output: true

Programming language

Aastha863 commented 3 years ago

Sir, I am a participant of LG SOC, kindly assign me with this issue in C++

agamgupta2015 commented 3 years ago

I want to work in Java