The Commons XR Interview Question

They asked me to write code to invert a binary tree