摘要:
* Binary tree的资料~http://cslibrary.stanford.edu/110/BinaryTrees.html1. Print binary tree in level orderclass Node{public: Node(int v) { value = v; left = 0; right = 0; } int value; Node *left; Node *right;};//Print binary tree in level ordervoid BST::bfs(Node *p){ queue<Node *> q; q.push(p); q. 阅读全文
摘要:
I have not figured out the parentheses and points yet.int infix(string exp){ stack<int> numStack; //for parsing the operand stack<int> operandStack; //for store the operands stack<char> operatorStack; // operators for(int i=0; i<exp.size(); i++) { if(exp[i] == ' ') { bre 阅读全文