
数据结构
韓豆豆
这个作者很懒,什么都没留下…
展开
-
关于循环队列的入队、出队、遍历的操作
#include"stdafx.h"#include<stdio.h>#include<stdlib.h>#define MAX 100//定义队列结构typedef struct Queue{ int *data; int rear; int front;}squeue;//初始化100个数字的队列void Initqueue(squeue *q){ q->data=(int *)malloc(MAX*sizeof(int)); q->fr原创 2020-05-29 14:07:38 · 8510 阅读 · 2 评论 -
实验课题二:单链表的创建、遍历
// 单链表.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include"malloc.h"//1.定义节点的数据结构typedef struct node{ int data; struct node *next;}Node,*pNode;//2.动态创建节点pNode createlist(){ int i,len; pNode head=(pNode)malloc(sizeof(Node)); pNode end=head;//尾原创 2020-05-15 20:35:19 · 318 阅读 · 0 评论