InterviewBit Problems   2-Sum Binary Tree : Solved


About the 2-Sum Binary Tree : Solved category (1)
Actual solution O(log(n)) space and O(n) time using doubly linked list (1)
Simple And Easy Soln Using ArrayList (1)
Solution with time complexity O(nlog(h)) is accepted (2)
C++ solution using set method (1)
Simple Solution : Time : n* Log(n) (1)
Input is confusing (1)
C++ Very Easy to understand Soln RoSh IITG (2)
2 pointer O(H) space (3)
Using stacks and flag variables (1)
[C++] [2-Sum Binary Tree] recursion (1)
C++ soln using stacks and 2-pointer method, O(n) time, O(h) space (2)
O(n) Java Solution using Hashing (1)
Easy recurcive c++ solution using hashing/unordered_map (1)
Small and simple C++ iterative solution using two pointer method (1)
Solution in C++ using stacks,inorder and two pointer method (1)
Solution using inorder and hashing C++ (2)
This takes O(n) memory and O(nlogn) time but passes all tests (1)
Simple solution in 0(h) space and o(n) time by two pointers approach (1)
Python 3 solution using inorder traversal (1)
Easy Java using bfs and HashSet (1)
Time complexity O(n) and space complexity O(height) solution using BSTIterator (1)
Easy Java Solution , Idea is use normal Inorder(LNR) and revers Inorder(RNL) and compare node sum with given sum using O(height) 2 stacks in o(n) time Offcourse u can use Collection Stack directly. but here I have implemented stack also (1)
C++-O(N) time complexity and O(N) space complexity using inorder traversal (1)
C++ solution using hashing (2)
User Stack solution (All constraints followed) (1)
Clean and simple solution c++ (1)
Lenient space contraints (1)
C++ O(height) space & O(n) time using unordered_map (1)
Simple java sol using arraylist (1)