摘要: #includeusing namespace std;//定义一个节点结构体struct node{ int key_value; node *p_left; node *p_right;};node *insert (node* p_tree,int key);node *s... 阅读全文
posted @ 2015-04-15 15:14 woaijava 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 栈的大小是固定的,这也就意味着不能无限的递归。递归到某些时候,栈顶将会没有更多空间来添加新的栈顶—就好像橱柜的空间被挤满,不能增加一个盘子一样void recurse(){ recurse(); //函数调用其自身}int main(){ recurse();//开始递归}//最终 栈空... 阅读全文
posted @ 2015-04-15 12:26 woaijava 阅读(4676) 评论(0) 推荐(0) 编辑