Question: Given a binary search tree having lesser values at the left subtree and larger values at the right subtree. Devise an algorithm to convert this binary search tree such a way that lesser values at the right subtree and larger values at the left subtree. Derive the time and space complexity of your algorithm.