since inorder traversal results in ascendingorder visit to node , we can store the values of the largest o which is smaller than a ( predecessor ) and smallest no which is large than a ( successor ) using inorder traversal
def find_p_s ( root , a , p , q ) : NEW_LINE