首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
leo110
2025年5月3日 17:49
单链表 题解:只为锻炼手搓单链表和相关功能
P1015
回复 0
|
赞 2
|
浏览 192
#include<bits/stdc++.h> using namespace std; struct Node{ int Element; struct Node *Next; }; Node *create(vector<int> num){ Node *head=nullptr,*q=nullptr;//声明同时赋值,防止出现野指针 for(int i=0;i<5;i++){//...
Xsw777
2025年3月3日 10:21
单链表 题解:用单链表的冒泡排序 C语言
P1015
回复 0
|
赞 25
|
浏览 733
#include <stdio.h> #include <stdlib.h> typedef struct Node{ int data; struct Node* next; }LNode,*LinkList; //排序 void BubbleSort(LinkList L){ LNode*pre,*p,*a; a = (LNode*)malloc(sizeof(LNode)); &nbs...
西电机试专家
2025年2月10日 14:48
单链表 题解:不会真以为我会用链表吧孩子
P1015
回复 0
|
赞 11
|
浏览 768
#include<bits/stdc++.h> using namespace std; int main(){ int a[5]; for(int i=0;i<5;i++){ cin>>a[i]; } sort(a,a+5); for(int i=0;i<5;i++){ ...
Candour
2024年4月20日 19:33
单链表 题解:
P1015
回复 0
|
赞 3
|
浏览 1.1k
#include<bits/stdc++.h> using namespace std; int a[5]; int main() { for(int i = 0; i < 5; i ++) cin >> a[i]; sort(a, a + 5); for(int i = 0; i < 5; i ++) cout << a[i] << " "; return 0; }
RingoCrystal
2024年4月3日 17:33
单链表 题解:你怎么知道我next节点全是nullptr
P1015
回复 0
|
赞 4
|
浏览 1.2k
#include <bits/stdc++.h> using namespace std; struct Node { int Element; // 节点中的元素为整数类型 struct Node * Next; // 指向下一个节点 }; bool rule(Node a,Node b){ return a.Element<b.Element; } int main(){ vector<Node> sheet; int n=5; int x; while(n--){ cin>...
为欢几何
2024年3月24日 14:47
单链表 题解:小伙伴们可以帮我检查一下哪里有问题吗?0%
P1015
回复 2
|
赞 2
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; struct Node { int Element; // 节点中的元素为整数类型 struct Node * Next; // 指向下一个节点 }; struct Node* create(int a[10]) { struct Node* head = (struct Node *)malloc(sizeof(Node));//建立头节点 he...
熹微
2024年3月27日 21:56
单链表 题解:
P1015
回复 0
|
赞 15
|
浏览 1.5k
C语言 边输入一个数据边进行链表插入 了解一下 #include<stdio.h> typedef struct Node{ int num; struct Node *Next; }node; int main(){ node *head,*s,*ptr; head = (node *)malloc(sizeof(node)); head -> Next = NULL;  ...
张会老儿
2024年3月25日 16:41
单链表 题解:我这个怎么不对,先把输入的数排序,然后用头插法插进链表,
P1015
回复 1
|
赞 3
|
浏览 877
#include<iostream> #include<stdio.h> #include<algorithm> #include<string.h> #include<stdlib.h> using namespace std; int compare(const void *a,const void *b){ return (*(int *)b-*(int *)a); } typedef struct node { int ...
1576684866
2024年3月22日 15:16
单链表 题解:顺便回忆一下头插法
P1015
回复 0
|
赞 11
|
浏览 1.1k
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> using namespace std; #include <string.h> #include <algorithm> #include <iostream> #include <map> #include <stdlib.h> typedef struct Node { int Element; // 节点中的元素为整数类型 &n...
光明守护神
2024年3月9日 21:27
单链表 题解:你怎么知道我没插?
P1015
回复 1
|
赞 2
|
浏览 1.1k
#include<algorithm> #include <iostream> using namespace std; int main() { int a[5]; for (int i = 0; i < 5; i++) { cin >> a[i]; } sort(a, a + 5); for (int i = 0; i < 5; i++) { cout << a[i] << " "; } cout << endl; return 0;...
1
2
3
4
题目
单链表
题解数量
39
发布题解
在线答疑
热门题解
1
单链表 题解:用单链表的冒泡排序 C语言
2
单链表 题解:
3
单链表 题解:顺便回忆一下头插法
4
单链表 题解:不会真以为我会用链表吧孩子
5
(单链表的创建和排序)练习是学知识的,钻空子没有意义
6
单链表 题解:
7
1015单链表(注释详细)
8
单链表 题解:你怎么知道我next节点全是nullptr
9
单链表 题解:C++
10
c-头插法