
数据结构
超级用户 root
zz
展开
-
数据结构实验(八)
//文件名:exp5-2.cpp#include <stdio.h>#define MaxSize 100int pathnum(int m,int n) //求解从(m,n)到(1,1)的路径条数{ if (m<1 || n<1) return 0; if (m==1 && n==1) return 1; return pathnum(m-1,n)+pathnum(m,n-1);}typedef struct{ int i,j;} PathType;原创 2021-10-31 15:12:57 · 346 阅读 · 0 评论 -
数据结构实验(六)
liqueue #include <stdio.h> #include <malloc.h> typedef char ElemType; typedef struct DataNode { ElemType data; struct DataNode *next; } DataNode; typedef struct { DataNode *front; DataNode *rear; } LinkQuNode; void InitQueue(LinkQu原创 2021-10-18 21:47:22 · 206 阅读 · 0 评论