This didn't make any sense to me, so I looked it up, and it seems exactly as senseless as I had thought. Is the 'inversion' not the same topology as the input?
my solution: "auto invert(regular_tree x){return static-cast<inverted_tree>(x);}".
When I tried to find what was meant by "invert a binary tree", the only thing that made sense was the operation of reversing the tree: ((1 2) (3 4)) becomes ((4 3) (2 1))
This didn't make any sense to me, so I looked it up, and it seems exactly as senseless as I had thought. Is the 'inversion' not the same topology as the input?
my solution: "auto invert(regular_tree x){return static-cast<inverted_tree>(x);}".