stackoverflow的讨论:print-binary-tree-in-a-pretty-way-using-c
- cpp代码
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double pi = acos(-1);
class BTNode {
public:
int val;
BTNode *left;
BTNode *right;
BTNode() {
this->left = nullptr;
this->right = nullptr;
val = -