-
Notifications
You must be signed in to change notification settings - Fork 0
/
code.h
45 lines (32 loc) · 761 Bytes
/
code.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef __CODE_H__
#define __CODE_H__
#include <iostream>
// Definition for a binary tree node.
class TreeNode {
public:
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
void Print()
{
std::cout << "[";
if (left != nullptr)
std::cout << left->val << "<-";
else
std::cout << "null<-";
std::cout << val;
if (right != nullptr)
std::cout << "->" << right->val;
else
std::cout << "->null";
std::cout << "]";
}
};
void call_code_94();
void call_code_123();
void call_code_4();
void call_code_296();
void call_code_98();
void call_code_17();
#endif // __CODE_H__