Given a Binary Search Tree (BST), write a function isTripletPresent() that returns true if there is a triplet in given BST with sum equals to 0, otherwise returns false.
First line consists of T test case. First line of every test case consists of N, denoting the number of nodes in bst. Second line of every test case consists of nodes.
Single line output, return true if triplet found else false.
5 -8 -2 10 11
1 3 -2 0 5
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.