Amazon Interview Question

given a binary search tree with root node r. now a specific node n is changed to root. write a function so that the after modification tree remains binary search tree.