Rivian Interview Question

Develop an algorithm to reverse a binary tree.