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

搜索二叉树

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

  • Journal-writing-method
    描述了如何写各种外文、中文期刊的编写方法和敲门,一起影响因子的统计(Described preparation method and knocked on the door of how to write a variety of foreign languages, Chinese journals with impact factor statistics)
    2013-01-29 10:26:09下载
    积分:1
  • 实现倒立摆,2013年电赛题目,代码简单耐看yicishnhe
    实现倒立摆,2013年电赛题目,代码简单耐看(Implementing inverted pendulum)
    2020-06-21 00:00:02下载
    积分:1
  • 识别 身份证图片中的文字(C#源码)
    选择身份证 正面 和反面,识别身份证中的 姓名、性别、民族、出生、地址、号码、签发机关、有效期等
    2019-07-26下载
    积分:1
  • 用WPF(Windows Presentation Framework)的项目,需要.NetFamework3.5,工程是VS2008的,包含SQL数据库文件。...
    用WPF(Windows Presentation Framework)的项目,需要.NetFamework3.5,工程是VS2008的,包含SQL数据库文件。 软件工程课程的课程实验项目,课程任务管理系统Orange。 项目利用了WPF的特性做出动画、多媒体效果,并使用了数据绑定、事件等。 代码并不复杂,但界面效果很好。-With WPF (Windows Presentation Framework) project needs. NetFamework3.5, the VS2008 project is, including SQL database files. Software engineering curriculum pilot project, the Curriculum Task Management System Orange. Project made use of WPF features to make animation, multimedia effects, and the use of data binding, events and so on. Code is not complex, but the interface works well.
    2022-01-30 16:46:40下载
    积分:1
  • JPEG_DECODE
    本解码器类支持普通jpeg文件格式,这也是目前大多数jpeg文件所采用的格式,此格式主要特点是数据精度为8位,采用Huffman编码的普通DCT帧(不支持扩展串行和递进模式及数学编码)。本解码器类的 IDCT算法采用三种模式,分别是浮点解码、定点整数解码和定点整数MMX优化解码,您可根据具体情况选择。(The decoder class support common JPEG file format, which is currently the most JPEG files in the format and the main characteristics of this format is data for 8-bit precision, using Huffman coding DCT common frame (does not support extended serial and progressive model and arithmetic coding). The decoder of the IDCT algorithm uses three modes, respectively, floating-point decoding, fixed-point integer decoding and fixed-point integer MMX optimization, you can choose according to the specific circumstances.)
    2021-04-29 14:38:42下载
    积分:1
  • ZM470SX
    说明:  sx1278 -zm470Mx基于stm系列单片机,可以实现数据收发(sx1278 -zm470Mx)
    2019-11-19 11:43:45下载
    积分:1
  • 朋友要的演示程序,连接远程主机端口并发送信息。(需远程监听,最好将CSDEMO服务器端也下了看看)。...
    朋友要的演示程序,连接远程主机端口并发送信息。(需远程监听,最好将CSDEMO服务器端也下了看看)。-friends to the demo program, linking remote host port and send information. (Subject to remote monitoring, the best CSDEMO server will also look at the under).
    2022-04-23 19:14:31下载
    积分:1
  • wifi
    重新定义了hostapd客户端源码。可以实现随时更改配置功能。(Redefine the hostapd client source code. It is possible to change the configuration function at any time.)
    2020-06-16 10:40:01下载
    积分:1
  • weideng
    汽车尾灯控制器,这是我第一次上在,没什么经验,以后努力(car taillight controller, this is my first time in, no experience, after efforts)
    2006-12-06 09:27:17下载
    积分:1
  • C# 串口读写程序 串口通讯示例源码
    C# 串口读写程序 串口通讯示例源码
    2014-03-26下载
    积分:1
  • 696518资源总数
  • 105895会员总数
  • 18今日下载