void AddNodes(TriangleNode <T> node, T value) { if (node == null) { node = new TriangleNode <T>(value); return; } else { //get the pointer TriangleNode <T> current = node; while (true) { if (current.left == null) { current.left = new TriangleNode <T>(value); break; } if (current.right == null) { current.right = new TriangleNode <T>(value); break; } } if (node.left == null) { node.left = new TriangleNode <T>(value); return; } } }
void CalculateSum(TriangleNode <T> rootNode) { }