public void SwapNodes(int k) { if (Level % k == 0) { Node aux = RightNode; RightNode = LeftNode; LeftNode = aux; } if (LeftNode != null) { LeftNode.SwapNodes(k); } if (RightNode != null) { RightNode.SwapNodes(k); } }
public void SwapNodes(int k) { if (Level % k == 0) { Node aux = RightNode; RightNode = LeftNode; LeftNode = aux; } if (LeftNode != null) { LeftNode.SwapNodes(k); } if (RightNode != null) { RightNode.SwapNodes(k); } }