图的邻接表创造及遍历输出 摘要:#include<iostream>using namespace std;#define MVNum 100#define MaxInt 32767//代表无穷大#define MVNum 100/…… 文章列表 2024年05月11日 0 点赞 0 评论 427 浏览 评分:0.0
关于C语言没有字符串数组的解决尝试 摘要:众所周知,在C语言中并没有自带的字符串型的数组这对我们解决一些问题时有些不便,那么我们有没有什么方法来解决这个问题呢?我想到了使用结构体来解决。简单介绍结构体:1.int main(){ st…… 文章列表 2024年05月11日 0 点赞 1 评论 315 浏览 评分:8.4
二叉树操作 摘要:#includeusing namespace std; typedef struct BiTNode//树节点 { int data;//TElemType struct BiT…… 文章列表 2024年05月11日 0 点赞 0 评论 285 浏览 评分:0.0
如何做计算器 摘要:#include <bits/stdc++.h>using namespace std;int main(){ int a,b; char x; cin>>a>>b>>x; i…… 文章列表 2024年05月12日 0 点赞 1 评论 222 浏览 评分:6.0
哈弗曼树的创建 摘要:#icnlude<iostream> using namespace std;//每次都从权值中重新挑选最小的两位 typedef struct { int weight;//权值 …… 文章列表 2024年05月13日 0 点赞 0 评论 380 浏览 评分:0.0
1023[编程入门]选择排序 这两种方法哪个好? 摘要:1023 [编程入门]选择排序目前知道两种方法。一种是交换数组元素,一种是选择数组元素。本质上都是实现的数组元素交换。但是第二种方法数组元素只交换了10次。是第二种速度更快吗?第一种方法:我自己…… 文章列表 2024年05月13日 0 点赞 0 评论 294 浏览 评分:0.0
线性表顺序表 摘要:#include<iostream> using namespace std; #define MAXSIZE 1000000 typedef struct { int *elem;…… 文章列表 2024年05月15日 0 点赞 0 评论 383 浏览 评分:0.0
两个链表合并 摘要:#include <stdio.h> typedef struct LNode{ int data; struct LNode* next; }LNode,*linkList; vo…… 文章列表 2024年05月15日 0 点赞 0 评论 379 浏览 评分:0.0
两个链表合成2 摘要:#include <stdio.h>typedef struct LNode{ int data; struct LNode* next;}LNode,*linkList;void initList(…… 文章列表 2024年05月15日 0 点赞 0 评论 325 浏览 评分:0.0
快速排序111 摘要:#include<iostream>using namespace std;void qicksort(int a[],int l,int r){ if(l>=r) return; int i=l-1…… 文章列表 2024年05月15日 0 点赞 0 评论 248 浏览 评分:0.0