Inverting a binary tree has kinda become a meme problem so it probably won’t show up in an interview but it is a pretty simple problem to understand if you look at a diagram
The root stays the same and you are just recursively swapping the children.
So you would need to switch the left and right children of the root then recursively call that function again with each child as the root to then swap their children and so on.