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

搜索二叉树

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

  • TradeCorpManageSystem
    vc++贸易公司信息管理系统,数据SQL2000(vc++ trading company information management systems, data SQL2000)
    2011-05-20 06:08:15下载
    积分:1
  • 嗨翻C语言.pdf
    程亦超老师翻译的一本关于C语言学习的书籍。 是我们学习C语言居家必备的书籍。本书向读者提供了C语言的完整学习体验。全书分为三个部分:第1章到第4章是基础知识,包括基本语法、指 针、字符串、小工具与源文件;第5章到第8章为进阶内容,有结构、联合、数据结构、堆、函数指针、动/静态链 接;最后四章是高级主题,内容涵盖了系统调用、进程间通信、网络编程和多线程。每部分结束后还有一个有趣 的实验,可以提高读者的实际操作能力。此外,书中还包含大量的图片、示例和代码,有助于读者对于知识的理 解和把握。 本书适用于C开发人员以及对C语言感兴趣的初学者。
    2021-05-06下载
    积分:1
  • MaterialEncodingPlatform
    本工具是Unicode编码转换,为您提供ASCII与Unicode互转,Unicode与中文互转,在文本框里输入要转换的内容,然后点击要转换的类型按钮,转换完成后即可看到对应的内容。
    2022-05-23 07:16:03下载
    积分:1
  • dt012
    micsdg sdlkfjl sdlkfj salksa dsaaslsa
    2017-09-29 00:44:00下载
    积分:1
  • LV-matlab
    labview程序调用matlab开发环境,采用matlab运行引擎开发(labview program calls matlab development environment, the use of matlab runtime engine development)
    2016-08-31 21:14:49下载
    积分:1
  • 测试C#使用数组、指针、托管、Win32接口调用的性能
    测试C#使用数组、指针、托管、Win32接口调用的性能-Test C# using an array, pointer, trusteeship, Win32 interface to call the performance
    2022-08-24 09:37:33下载
    积分:1
  • AdoNetEntityDataModelCSharp
    机器视觉啊;想下个东西哈哈哈哈哈哈哈哈哈(machine vision ,Think of the next thing)
    2019-04-10 11:43:23下载
    积分:1
  • paihang
    有2*n个盒子排成一行,其中有两个相邻的空盒,有n-1个盒子有符号 A ,有n-1个盒子有符号 B 。例如,n=5,并有初始配置如下: A B B A . . A B A B (2* n box row, wherein there are two adjacent empty box, n-1 of a box with the symbol ' A' , the symbol ' B' n-1 th box. For example, n = 5, and the initial configuration is as follows: ABBA .. ABAB)
    2013-02-25 18:43:03下载
    积分:1
  • SAEJ1939_CANbus
    利用SAE1939作应用层协议的CAN总线网络开发,特别适合初学CAN总线者。(use SAE1939 application layer protocol for the CAN network development, particularly suitable for beginners who CAN.)
    2007-01-20 13:14:45下载
    积分:1
  • STm32f103-CAN
    STM32F103 CAN通信源码,使用3.5固件库,包含回环测试和正常通信(STM32F103 CAN commucate routine ,using fw3.5 library,including backloop and normal mode)
    2014-04-03 21:01:12下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载