数据结构与算法(C++版)谁的视频教程好?在哪里下?
有C++版的数据结构视频教程,看看这个是否适合你,希望可以帮到你!
我有数据结构幻灯片课件,要是找视频教程的话在迅雷里搜会搜到很多的,要课件的话可以把邮箱留一下,发给你
求徐士良的 第二版的课后答案、课件PPT、练习题等等资料、、
《计算机软件技术基础》从实用的角度,首先系统地介绍了计算机软件技术的概念和基本问题;从实际编程的需要介绍了存储器管理、文件管理以及处理机管理3部分内容;针对典型数据结构线性表、树、图及其基本运算,结合大量的例题进行了深入的讲解;介绍了一些编程中的常用算法,并以实例说明了算法与数据结构之间相辅相成的关系;对数据持久存储的几种形式――文件、数据库、数据仓库进行了比较和说明,以实例的形式逐步展开讲解了应用软件研制的过程。《计算机软件技术基础》附录中给出的专题作业及实验设计,可用以全面考查学生对于《计算机软件技术基础》内容的掌握。 《计算机软件技术基础》既可作为全日制高等学校本科非计算机类专业的软件技术课程的教材,也可作为软件应用工程师的入门参考。
发给你了,呵呵 ……,我也是找了好长时间才搞到的……
数据结构C语言版 二叉树构造算法实验 在键盘上怎么输入
同学你好:我帮你看了你的程序:这是修改了的程序:希望你能采纳:
这是实验结果:是正确的
#include stdio.h
#include stdlib.h
#define OK 1
#define ERROR 0
#define OVERFLOW -2
typedef char TElemType;
typedef int Status;
typedef struct BiTNode { // 结点结构
TElemType data;
struct BiTNode *lchild, *rchild;
// 左右孩子指针
} BiTNode, *BiTree;
//以下是建立二叉树存储结构
Status CreateBiTree(BiTree &T) {
//请将该算法补充完整,参见第6章课件算法或课本
char ch;
scanf( %c,&ch);
if(ch=='#') T=NULL;
else{
if(!(T=(BiTNode*)malloc(sizeof(BiTNode))))
exit(OVERFLOW);
T->data=ch;
CreateBiTree(T->lchild);
CreateBiTree(T->rchild);
}
return OK;
} // CreateBiTree
void Preorder(BiTree T)
{
if(NULL == T)
{
return;
}
else
{
printf(%c,T->data);
Preorder(T->lchild);
Preorder(T->rchild);
}
}
void Inorder(BiTree T)
{ // 中序遍历二叉树
//请将该算法补充完整,参见第6章课件算法
if(T)
{
Inorder(T->lchild);
printf(%c,T->data);
Inorder(T->rchild);
}
}
void Postorder(BiTree T)
{ // 后序遍历二叉树
//请将该算法补充完整,参见第6章课件算法
if(T)
{
Postorder(T->lchild);
Postorder(T->rchild);
printf(%c,T->data);
}
}
//以下是求叶子结点数
void CountLeaf(BiTree T,int& count){
//请将该算法补充完整,参见第6章课件算法
if(T){
if((!T->lchild)&&(!T->rchild))
count++;
CountLeaf(T->lchild,count);
CountLeaf(T->rchild,count);
}
}
//以下是求二叉树的深度
int Depth(BiTree T ){
//请将该算法补充完整,参见第6章课件算法
int depthval,depthLeft,depthRight;
if(!T) depthval=0;
else{
depthLeft = Depth(T->lchild);
depthRight = Depth(T->rchild);
if(depthLeft>depthRight)depthval = 1+depthLeft;
else depthval = 1+depthRight;
}
return depthval;
}
void main(){
BiTree T;
int s=0,d;
printf(n creat of the bitree:n);
CreateBiTree(T);
printf(n output result of Preorder:n);
Preorder(T);
printf(n);
printf(n output result of Inorder:n);
Inorder(T);
printf(n);
printf(n output result of Postorder:n);
Postorder(T);
printf(n);
CountLeaf(T,s);
d=Depth(T);
printf(n leaves=%dn,s);
printf(n depth=%dn,d);
}
建立二叉树函数里,这句错了:scanf(&ch); ===》scanf(%c,&ch);