Skip to content

Instantly share code, notes, and snippets.

@liuxiaochuang
liuxiaochuang / tree visit
Created November 11, 2018 10:05
Tree mid visit
void root_medium(TreeNode* root) {//中序,这个难
cout<<"中序遍历:";
stack<TreeNode* > sta;
TreeNode * p = root;
while(sta.size() || p) {
while(p) {
sta.push(p);
p = p->left;
}
if (sta.size()) {
@liuxiaochuang
liuxiaochuang / my_filename
Created September 14, 2018 09:36
my first gist test
this is just a test.