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

搜索二叉树

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

  • led
    数码管动态显示 能实现数码管的滚动显示(Dynamic display of digital control to achieve digital tube rolling display)
    2008-06-11 10:08:40下载
    积分:1
  • microsoft-bluetooth-API
    使用 VC++ 调用微软蓝牙 API 函数的示例代码。可以使用 VC++6.0 至 VC++2010 编译代码。(Using VC++ call Microsoft Bluetooth API sample code. You can use VC++6.0 to VC++2010 compiled code.)
    2020-12-23 09:09:06下载
    积分:1
  • _Heikkila-a-Silven
    张正友标定法中计算内参的方法,经典原文资料(calculate Intrinsics zhang s method)
    2014-12-04 10:38:34下载
    积分:1
  • C语言参考手册
    1.C参考手册.chm 2.C函数查询.chm 3.C语言标准库函数大全.chm 4.C语言库函数使用大全CHM版.chm 5.C语言库函数速查手册.chm
    2021-05-06下载
    积分:1
  • FinaceMIS
    说明:  一个用MFC编写的家庭财务管理系统.采用了Sqlserver数据库.压缩包中已包括了所需的数据库文件.可直接附加到SQL服务器.(Using MFC to prepare a family financial management system. Using sqlserver database. Compressed package includes the necessary database files. Can be directly attached to the SQL server.)
    2008-09-11 18:08:12下载
    积分:1
  • power allocation to the mobile cell
    本文提出了一种基于最优分配的移动小区资源分配算法算法。这个将基于c编程资源分配给用户。功率和信道分配给用户以宏基站为中心节点,用户通过不同的方式获取资源分配信道分配是基于对用户的功率分配来完成的。
    2022-01-31 03:26:25下载
    积分:1
  • 1378
    基于互功率谱的时延估计,计算互信息非常有用的一组程序,music高阶谱分析算法。( Based on the time delay estimation of power spectrum, Mutual information is useful to calculate a set of procedures, music higher order spectral analysis algorithm.)
    2017-05-11 15:57:41下载
    积分:1
  • 交通灯循环 - 副本
    说明:  实现普通交通等的控制,使用超声波增加了车流量的检测(To achieve the control of general traffic, the use of ultrasound increases the detection of traffic flow.)
    2019-04-04 09:40:08下载
    积分:1
  • lesson-1
    Windows程序运行原理及程序编写流程,窗口产生过程,句柄原理,消息队列,回调函数,窗口关闭与应用程序退出的工作关系,使用VC++的若干小技巧,stdcall与cdecl调用规范的比较,初学者常犯错误及注意事项。(Run Windows program principles and procedures for the preparation process, the process window, handle theory, message queues, the callback function, the application window is closed and quit working relationship, using VC++ several tips, stdcall and cdecl calling conventions comparison, beginners often mistakes and precautions.)
    2013-12-25 18:17:24下载
    积分:1
  • curl-7.65.1
    说明:  Duilib 是一款强大的界面开发工具,可以将用户界面和处理逻辑彻底分离,极大地提高用户界面的开发效率,遵循bsd协议。(Duilib is a powerful interface development tool, which can completely separate the user interface and processing logic, greatly improve the development efficiency of user interface, and follow the BSD protocol.)
    2020-06-19 19:40:02下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载