Sponsored
Use these hints if you're stuck. Try solving on your own first.
Convert the tree to a sorted array using an in-order traversal.
Construct a new balanced tree from the sorted array recursively.
Solve with full IDE support and test cases