伪码的意思就是假的代码。意思就是要你自己去写噻,比如数据结构上的链表,是不是它要不写一些只有名称的CreateList_L_Last(LinkList L)之类的嘛。意思就是要自己去写如何给链表赋值。参考:typedef struct LNode { int data;struct LNode *next;}LNode,*LinkList;//尾插法添加数据 void Create...
数据结构C语言版的伪代码怎么转换
伪码的意思就是假的代码。
意思就是要你自己去写噻,比如数据结构上的链表,是不是它要不写一些只有名称的CreateList_L_Last(LinkList L)之类的嘛。
意思就是要自己去写如何给链表赋值。
参考:
typedef struct LNode
{
int data;
struct LNode *next;
}LNode,*LinkList;
//尾插法添加数据
void CreateList_L_Last(LinkList &L)
{
L=(LinkList)malloc(sizeof(LNode));
L->next=NULL;
LinkList s=(LinkList)malloc(sizeof(LNode));
s=L;
printf("建立单链表,输入元素个数:");
int n;
scanf("%d",&n);
printf("输入元素个数:");
for(int i=0;i<n;i++)
{
LinkList p=(LinkList)malloc(sizeof(LNode));
scanf("%d",&p->data);
s->next=p;
s=p;
s->next=NULL;
}
}2010-05-22
所谓的伪代码就是用一个函数封装一个功能,方便构建程序...2010-05-08
在网上查到的,你可以到网上搜索一下,会有不少此c语言描述的数据结构源程序
#include
"stdio.h"
#include
"malloc.h"
#include
"stdlib.h"
#define
ok
1
#define
NULL
0
#define
OVERFLOW
-1
typedef
struct
BiNode
{
char
data;
struct
BiNode
*Lchild
,*Rchild;
}BiNode,*BiTree;
typedef
BiTree
BsTree;
int
BsTreeInsent(BsTree2019-09-02