登录
首页 » 算法 » 数据结构-算法-C语言-Demo

数据结构-算法-C语言-Demo

于 2022-01-29 发布 文件大小:186.66 kB
0 190
下载积分: 2 下载次数: 1

代码说明:

#ifndef _BINARY_TREE_H_INCLUDED#define _BINARY_TREE_H_INCLUDED#include #include templatestruct Bintree_node {T element;Bintree_node* lchild;Bintree_node* rchild;explicit Bintree_node(const T& elem=T(), Bintree_node* lchd=0, Bintree_node* rchd=0): element(elem), lchild(lchd), rchild(rchd) {}};templateclass Binary_tree {public:typedef Bintree_node* PBtn;Binary_tree();virtual ~Binary_tree();void clear();int depth() const;int size() const;virtual PBtn find(const T& elem) const=0;virtual void insert(const T& elem)=0;virtual void erase(const T& elem)=0;virtual void print(std::ostream& output) const=0;void print_tree(std::ostream& output) const;protected:

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

发表评论

0 个回复

  • Smbus总线标准程序
    该代码为I2C标准主从协议及代码,笔记本电池电量的读取,用模拟I2C总线不能读取成功,用标准的SMBUS协议可以读出,因为有些器件对时序的要求较高,本协议时序严格,适合对I2C等外设开发人员进行二次开发
    2023-05-19 20:20:04下载
    积分:1
  • 模拟植物生长的分形树源程序
    模拟植物生长算法的分形树源程序,根据迭代次数的不同获得一株完整的植物生长图,对其具体的参数进行修改可以做一些人工智能方面的优化
    2022-07-18 00:27:02下载
    积分:1
  • LCD项目
    这是一个代码初始化和使用爱特梅尔在屏幕液晶书写和编程上atmega16a同样是一个代码使用4X4键盘matricila
    2022-06-15 17:41:12下载
    积分:1
  • 器的java代码
    Calculator java code
    2022-06-28 06:51:46下载
    积分:1
  • 解决约瑟夫环问题
    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace 实战_使用数组解决约瑟夫环问题 {     class Program     {         static void Main(string[] args)         {             int[] intPers = Jose(12, 3, 4);             Console.WriteLine
    2023-06-26 06:40:03下载
    积分:1
  • OFDM源代码仿真
    有关OFDM的源代码,非常非常有用
    2022-05-08 13:57:33下载
    积分:1
  • 通过奇异值分解的最小二乘拟合
    通过奇异值分解实现的最小二乘拟合算法 inear least-squares fit by singular value decomposition-through the singular value decomposition of the least squares fitting algorithm inear least-squares fit by singular value decomposition
    2022-04-20 14:07:19下载
    积分:1
  • for n! The lowest number is not 0. Use mathematical laws and mod
    求n!的最低位不是0的数.用到数学规律和mod-for n! The lowest number is not 0. Use mathematical laws and mod
    2022-03-06 15:43:39下载
    积分:1
  • 步态识别源码
    详细说明:2DPCA用于人脸、步态等图像识别,可先按照行列比例将不规整图像归一化处理,然后进行训练,并且识别,全部中文注释和提示,便于学习和参考。-2DPCA humanface, gait, such as image recognition, in accordance with the ranks of theratio can not structured to deal with the normalized image, and then training,and recognition, all Chinese notes and tips for learning and reference.
    2023-02-23 20:00:04下载
    积分:1
  • 将遗传的变异思想巧妙引入粒子群中改进粒子群寻优性能
    应用背景对于智能计算、优化理论方面,遗传算法和粒子群算法都属于现代仿生类优化算法,但是两者还是存在差异,遗传算法的核心在于变异和交叉,粒子群算法的核心在于个体寻优和群体寻优之间取平衡。通常研究者机械地将将两种算法结合起来,使得程序复杂,运行时间偏长,本程序以粒子群算法为主,巧妙地将遗传算法的变异思想引入粒子群算法,这一简单改进却可以大大提高粒子群算法的性能。但是,注意 引入随机数时的阈值 需要反复试验确定,目前这个程序没有做到阈值自适应。关键技术将遗传算法的变异思想 巧妙引入 粒子群算法 中改进粒子群算法寻优性能,使得寻优速度更快,当测试复杂高维的benchmark时,也更加接近最优值
    2022-12-04 03:20:03下载
    积分:1
  • 696516资源总数
  • 106562会员总数
  • 4今日下载