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

搜索二叉树

于 2022-02-28 发布 文件大小:447.11 kB
0 49
下载积分: 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 个回复

  • 65121890
    网络通信开发包,c++,队列管理,故障管理与负载收集(Tcp-IP )
    2009-03-17 12:00:56下载
    积分:1
  • tempreturesensor-and-Humiture
    SHT71温湿度传感器源程序,通过测试(tempreturesensor and Humiture)
    2011-08-15 11:41:58下载
    积分:1
  • 765487777
    UITableViewCell 视图扩展,精选ios编程学习源码,很好的参考资料。(The UITableViewCell view, select learning IOS programming source code, a good reference.)
    2013-12-07 12:53:08下载
    积分:1
  • TQ210串口下载裸机程序
    TQ210开发板串口裸机下载程序,方便调试裸机程序(TQ210 Uart DownLoad)
    2020-06-24 15:40:02下载
    积分:1
  • Newnes.Programming.32-bit.Microcontrollers.in.C
    This is ebook good for you about Programming 32-bit Microcontroller
    2009-07-19 20:02:25下载
    积分:1
  • B/s结构,采用 asp.net(C#)+ MS SQL 编写 OA_at
    B/s结构,采用 asp.net(C#)+ MS SQL 编写。严格按照三层结构,不失为学习 C#的好例子。安泰OA办公系统自动化系统(B/s structure and Asp. Net (C#) MS SQL prepared. In strict accordance with the three-tier structure is, after all, learn C# a good example. Aetna OA office automation system)
    2020-06-26 08:20:02下载
    积分:1
  • hilbert_trans_basic
    Hilbert 变换测试 适合新手对Hilbert变换的理解(Hilbert Transformation)
    2014-09-22 02:26:46下载
    积分:1
  • Copys
    拷贝txt文件中路径的文件到另一个文件夹。(Txt file path copy files to another folder.)
    2014-10-27 16:24:34下载
    积分:1
  • RentalSystem
    C#汽车租赁系统源代码,可完成租车、还车、新车入库信息登记,查询租车信息,精选C#学习源码。(C# car rental system source code, can be completed car, car, car storage information registration, query the rental information, select C# learning source.)
    2013-12-17 13:16:57下载
    积分:1
  • dd
    说明:  另一种潮流计算程序,本程序使用C语言编写(Another flow calculation procedures, the procedures using the C language)
    2012-11-20 21:43:07下载
    积分:1
  • 696518资源总数
  • 104321会员总数
  • 14今日下载