二叉树相关算法现.docVIP

  • 2
  • 0
  • 约13.83万字
  • 约 16页
  • 2016-12-04 发布于河南
  • 举报
二叉树相关算法现

二叉树相关操作及C++实现 .cpp文件部分 #includeiostream #include,,,,,,,,bintree.h using,,,,,,,,namespace,,,,,,,,std; int,,,,,,,,main,,,,,,,,(){ BintreeNodeint,,,,,,,,*,,,,,,,,tpr; int,,,,,,,,ch=-1; Bintreeint,,,,,,,,bin(tpr); ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,bin.setstop(ch);,,,,,,,,//设置stop// cout输入树各个节点数据:endl;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,//输入数据// BintreeNodeint,,,,,,,,*,,,,,,,,tph=bin.creat();,,,,,,,, bin.setroot(tph);//创建二叉树// int,,,,,,,,c; cout1:读取stopendl; cout2:查找指定数据endl; cout3:先根遍历endl; cout4:中根遍历endl

文档评论(0)

1亿VIP精品文档

相关文档