Implement a method that, given an input binary tree T with
n nodes, performs a sequence of up to n rotations (which can beleft or right rota-
tions) to transform T into a caterpillar (a tree for which everyleft child is a leaf). in C++
PayPal Gateway not configured
PayPal Gateway not configured