登录
首页 » c++ » 搜索二叉树

搜索二叉树

于 2022-02-28 发布 文件大小:447.11 kB
0 108
下载积分: 2 下载次数: 1

代码说明:

#pragma once template struct Node { T _data; Node* left; Node* right; Node(T val) :_data(val), left(NULL), right(NULL) {} ~Node() {} }; template class BinSearchTree { public: BinSearchTree() :_root(0) {} void CreatTree(char* str) { int n = strlen(str); CreatTree_(_root,str,n); } void comFather(char a,char b) { return comFather_(_root,a,b); } protected: void comFather_(Node* root,char a,char b) { if (root->_data > a && root->_data < b) { cout _data _data > a && root->_data > b) comFather_(root->left, a, b); if (root->_data < a && root->_data < b) comFather_(root->right, a, b); } void insertVal(Node*& root, char ch) { if (root == NULL) { root = new Node(ch); return;

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • OpenGL-master
    说明:  关于OpenGL的几个小例子,画图,光照等各个方面的。(OpenGL--Several small examples of OpenGL, drawing, lighting and other aspects.)
    2019-04-18 19:09:39下载
    积分:1
  • 医院体检管理系统(设计文档+源码).rar
    文档部分:有软件工程开发全过程,包含需求分析,概要设计,数据库设计,详细设计以及小工程表和大工程表的设计模版等等,是一个较为完备的一套设计思路。 源码功能:内有数据库设计,用户注册,登陆,修改密码界面;主界面有体检登记,项目预览和预定,体检费用统计和项目录入,同时还有结果的录入;系统管理员还有对数据导入和导出的权限
    2019-10-14下载
    积分:1
  • 人脸特征点检测,轻量级的MTCNN实现
    轻量级的MTCNN实现,无需caffe和tensorflow基本库支持,内部实现卷积运算,速度比普通mtcnn要快一倍。
    2020-06-01下载
    积分:1
  • C++ 读取文件内容
    C 文件操作参考实例,方便学习文件操作,数据转换
    2020-02-13下载
    积分:1
  • vb助手
    一vb编写的串口同行源码,共享给大家,挺好的,评论积分啊
    2023-07-31 19:15:04下载
    积分:1
  • merchandising
    用C++及SQL2000编写的商品销售管理系统及其后台数据库(SQL2000 with C++ and written in merchandising and back-end database management system)
    2011-04-24 16:27:55下载
    积分:1
  • can-tx
    DSP28335 CAN 接收程序,肯定能用(DSP28335 CAN receiving program, and certainly can)
    2014-11-11 16:14:47下载
    积分:1
  • STM8L_for_sensor
    说明:  使用STM8L调试MPU6050和BMP280(using STM8L to drive mpu6050 and bmp280)
    2019-04-21 16:15:26下载
    积分:1
  • DotNetBar的Popup实例源码(cs/vb均包含)
    DotNetBar的Popup实例
    2014-12-08下载
    积分:1
  • pso-svm one output
    实现多输入单输出的预测功能,预测精度高,程序操作简单,易于修改应用。(The prediction function of multi input and single output is realized. The prediction accuracy is high, the program operation is simple, and it is easy to modify the application.)
    2017-09-26 16:01:40下载
    积分:1
  • 696518资源总数
  • 106227会员总数
  • 11今日下载