问题
Write a function that takes in a Binary Tree and inverts it. In other words, the function should swap every left node in the tree for its corresponding (mirrored) right node. Each Binary Tree node has a value stored in a property called “value” and two children nodes stored in properties called “left” and “right,” respectively. Children nodes can either be Binary Tree nodes themselves or the None (null) value.
编写一个接受二叉树并将其反转的函数。换句话说**,该函数应该将树中的每个左节点交换为相应的(镜像的)右节点**。每个二叉树节点都有一个值存储在名为“value”的属性中,两个子节点分别存储在名为“left”和“right”的属性中。子节点可以是二叉树节点本身,也可以是None(null)值。
左边是