update Search_in_Rotated_Sorted_Array_II using BST template