Construct a BST from given pre - order traversal for example if the given traversal is { 10 , 5 , 1 , 7 , 40 , 50 } , then the output should be the root of the following tree . 10 / \ 5 40 / \ \ 1 7 50
class Node { int data ; Node left , right ; Node ( int data ) { this . data = data ; this . left = this . right = null ; } } class CreateBSTFromPreorder { private static Node node ;