E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
Sorting
常见排序算法——七大比较类排序算法(Seven Most Common
Sorting
Algorithm)
算法最坏复杂度平均复杂度最好复杂度空间复杂度稳定性选择排序(Selection)O(n2)O(n2)O(n2)O(1)不稳定插入排序(insertion)O(n2)O(n2)O(n)O(1)稳定希尔排序(Shell)O(nlog(n))~O(n2)O(n1.3)O(n)O(1)不稳定冒泡排序(Bubble)O(n2)O(n2)O(n)(用交换flag改进)O(1)稳定快速排序(Quick)O(n2
蓝色枫魂
·
2020-09-15 20:20
Algorithm
and
Data
Structure
拓扑排序(Topological
Sorting
)
一、什么是拓扑排序在图论中,拓扑排序(Topological
Sorting
)是一个有向无环图(DAG,DirectedAcyclicGraph)的所有顶点的线性序列。
神奕
·
2020-09-15 19:27
Basic
-
算法/数据结构
一点一点学算法
图
拓扑排序
C++实现
排序算法性能分析
一、基于比较的排序算法1.插入排序法直接插入排序,希尔排序,不常用的:Treesort;Librarysort:Patience
sorting
2.交换排序冒泡排序,快速排序,计数排序3.选择排序直接选择排序
don_lvsml
·
2020-09-15 19:43
算法面试
排序算法
算法
排序(二) - 外部排序
External
Sorting
外部排序,指待排序文件较大,内存依次放不下,需存放在外存的文件的排序。
Whywait_1
·
2020-09-15 19:48
Data
Structure
数据结构
外部排序
排序
最佳归并树
置换-选择算法
排序(一) - 内部排序
Internal
Sorting
基本概念排序:重新排列列表中元素,使表中元素满足按关键字有序的过程。
Whywait_1
·
2020-09-15 19:48
Data
Structure
数据结构
排序算法
快速排序
CodeForces 876D
Sorting
the Coins
题目链接:http://codeforces.com/contest/876/problem/D题意:有n个位置,有n次操作,每次操作在第p[i]位上放上一枚硬币,然后每次放上一枚硬币以后,你要从左往右扫一遍,如果一个硬币右边没有硬币,你就要把他移动到右边有硬币位置,然后在去看下一个硬币,一直重复,知道当前的所有硬币都移到最右边,问你每次操作,需要多少步才能移到最后,初始状态算一步解析:你只需要从
15zhazhahe
·
2020-09-15 13:02
ACM
OnlineJudge
Codeforces
ACM
模拟
Codeforces
漫漫补题路
List
Sorting
(25)
Description:Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointegersN(#include#include#includeus
梅钰
·
2020-09-15 06:55
PAT(Advanced)
List
Sorting
(25)@Java实现
1028.List
Sorting
(25)时间限制200ms内存限制65536kB代码长度限制16000B判题程序Standard作者CHEN,YueExcelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachca
JacobGo
·
2020-09-15 06:17
PAT
1028 List
Sorting
(25分)(测试点超时问题)
1028List
Sorting
(25分)Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification
one joker
·
2020-09-15 06:11
PAT甲级
List
Sorting
(25)
一开始id,name,grade全部用string类型表示,发现在输入时用cin会严重影响效率,最后一个case无法通过,将id,grade改为int类型后可以,说明C++的标准输入输出有时效率还是太低,如无必要优先选择scanf,printf。#include#include#includeusingnamespacestd;structStudent{intid;stringname;intg
十觞亦不醉
·
2020-09-15 06:05
PAT(Advanced
Level)
PAT甲级真题 1052 Linked List
Sorting
(25分) C++实现(模拟链表)
题目Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.WeassumethateachstructurecontainsanintegerkeyandaNextpointertothenextstructure.Nowgivenalinkedlist,youaresupposedtosor
zhang35
·
2020-09-15 06:32
PAT
链表
算法
数据结构
PAT甲级真题 1028 List
Sorting
(25分) C++实现(简单排序)
题目Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointegersN(#include#includeusingnamespacestd;st
zhang35
·
2020-09-15 06:31
PAT
数据结构
快速排序
算法
Linked List
Sorting
Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.WeassumethateachstructurecontainsanintegerkeyandaNextpointertothenextstructure.Nowgivenalinkedlist,youaresupposedtosortt
exmy
·
2020-09-15 06:57
PAT
List
Sorting
pat1028题解简单排下序。importjava.util.ArrayList;importjava.util.Collections;importjava.util.Comparator;importjava.util.Scanner;classStudent{StringID;Stringname;intscore;publicStudent(StringiD,Stringname,ints
exmy
·
2020-09-15 06:57
PAT
PAT 1052 Linked List
Sorting
(25分) 结构体排序而已
题目Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.WeassumethateachstructurecontainsanintegerkeyandaNextpointertothenextstructure.Nowgivenalinkedlist,youaresupposedtosor
wwang_dev
·
2020-09-15 06:09
c/c++
algorithm
PAT
链表
算法
数据结构
c++
1028 List
Sorting
(25 分)
Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification:Eachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointegersN(≤105)andC,whereNisthenum
王重阳道长
·
2020-09-15 06:09
甲级PAT
甲级
PTA
1028
List
Sorting
(25
分)
PAT甲级 1028 List
Sorting
模拟+排序
Solution:这道题的意思是,有n(n#include#include#includeusingnamespacestd;intn,c;//n个学生,c为第几个选择structstudent{charid[10];charname[8];intgrade;}stu[100005];boolcmp1(studenta,studentb){returnstrcmp(a.id,b.id)<0;}bo
化身孤岛的鲸o
·
2020-09-15 06:34
PAT
模拟
PAT (Advanced Level) Practice 1028 List
Sorting
(25分)
1028List
Sorting
(25分)Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification
菱形继承
·
2020-09-15 06:55
#
PAT
Advanced
PTA-1028——List
Sorting
题目:Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification:Eachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointegersN(≤)andC,whereNisthenum
weixin_30832405
·
2020-09-15 05:12
List
Sorting
(25)
题目如下:Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointegersN(#include#include#include#include#
weixin_30384031
·
2020-09-15 05:30
c/c++
Linked List
Sorting
(25)
题目:https://www.patest.cn/contests/pat-a-practise/1052#include#includeusingnamespacestd;#definemaxn100010structNode{intaddress,next;intdata;intflag;Node(){address=0;next=-1;data=100010;flag=0;}}node[ma
dayL_W
·
2020-09-15 05:41
PAT甲级
Linked List
Sorting
测试用例很坑。注意链表为空的情形,并且可能有孤节点。#include#include#include#include#includeusingnamespacestd;structNode{intaddr;intvalue;intnext;inttag;};boolcompare(constNode&s1,constNode&s2){returns1.valuemylist;list::const
learner_cv
·
2020-09-15 05:08
PAT
List
Sorting
(25)
题目描述Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.翻译:Excel可以根据任何列对记录排序。现在你需要模仿这个机制。INPUTFORMATEachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointeg
幻世至上
·
2020-09-15 05:46
PAT练习
List
Sorting
Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointegersN(#include#include#includeusingnamespace
klel
·
2020-09-15 05:50
【PAT甲级题解】1052 Linked List
Sorting
(25分)
本题常规链表题,与乙级有区别的地方是,这次要求对值排序,而不是翻转或者区块翻转,对于值排序,我选择使用第一个结构体按照散列存入list数组中,为了处理脏数据还能实现排序,选择使用第二个结构体node1存入vector中,然后对vector中的数据排序,排序后循环输出,坑点一:存在全部都是脏数据的情况,需要输出0和-1,但是第一次做测试点3错误扣3分,最终拿到22分,一直没找到答案,先放在这里,今后
苯酸氨酰糖化物
·
2020-09-15 05:06
PAT甲级题解
算法
c++
PAT甲级1028(列表排序)
1028List
Sorting
(25point(s)) Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification
_云胡
·
2020-09-15 05:05
PAT甲级
OJ
PAT
甲级
List
Sorting
(PAT)
1.题目描述Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.Excel可以根据任何列对记录进行排序。现在你应该模仿这个函数。2.输入描述:Eachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointegers
小-黯
·
2020-09-15 05:34
#
PAT甲级(Advanced
Level)练习题
C语言
算法
PTA甲级考试真题练习28——1028 List
Sorting
题目思路水题代码#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definenmax105#defineinf999999intnum,order;typedefstructinfo{longID;stringname
醉等佳人归
·
2020-09-15 05:32
PAT甲级考试真题练习
switch
算法
PAT 1028 List
Sorting
翻译 分析 代码
#include#include#includeusingnamespacestd;structstudent{intid;charname[10];intsorce;}stu[100010];boolcmp1(studenta,studentb){returna.id
Acw_power
·
2020-09-15 05:53
PAT
初识代码
小白进阶
PAT 甲级A1052 Linked List
Sorting
(25 分)
题目:1052LinkedList
Sorting
(25分)Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.WeassumethateachstructurecontainsanintegerkeyandaNextpointertothenextstructure.Nowgivenalin
番茄杀手Dexter
·
2020-09-15 05:52
1028 List
Sorting
(25分)
1028List
Sorting
(25分)Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification
雪之下雪乃”
·
2020-09-15 05:20
从零开始的pat甲级
1028 List
Sorting
(25 分)(C++)
Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification:Eachinputfilecontainsonetestcase.Foreachcase,thefirstlinecontainstwointegersN(≤105)andC,whereNisthenum
Brielleqqqqqqjie
·
2020-09-15 05:15
PAT甲级
PAT-ADVANCED1028——List
Sorting
我的PAT-ADVANCED代码仓:https://github.com/617076674/PAT-ADVANCED原题链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805468327690240题目描述:题目翻译:1028列表排序Excel可以根据任何列对记录进行排序。现在你需要模仿这个功能。输入格式:每个输入
清風逐尘乀
·
2020-09-15 05:13
PAT甲级真题题解
1052 Linked List
Sorting
(25分) 最后一个测试点遇到段错误 +别人的代码
1052LinkedList
Sorting
(25分)Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.WeassumethateachstructurecontainsanintegerkeyandaNextpointertothenextstructure.Nowgivenalinked
生于忧患,死于安乐2017
·
2020-09-15 05:42
PTA
PAT排序总结
TheBestRank(25)1013.PhoneBills(25)1017.QueueingatBank(25)1025.PATRanking(25)1026.TableTennis(30)1028.List
Sorting
asianleolion
·
2020-09-15 05:58
总结
PAT-A
浙大 PAT 甲级 1028 List
Sorting
分析继1027题之后第二水的一道题。整道题啥也没考,单纯考察一个sort函数用法而已。sort函数是包含在algorithm.h头文件中的一个函数,可以对数组以及STL中的容器排序。用法也很简单,代码一看就知道了~#include#include#include#includeusingnamespacestd;structRecord{intid;charname[9];intgrade;};v
马铃薯小弟
·
2020-09-15 05:57
PAT
1052 Linked List
Sorting
(25)(25 分)
Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.WeassumethateachstructurecontainsanintegerkeyandaNextpointertothenextstructure.Nowgivenalinkedlist,youaresupposedtosortt
god_speed丶
·
2020-09-15 05:25
PAT甲级
Linked List
Sorting
(25)(链表)
Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.WeassumethateachstructurecontainsanintegerkeyandaNextpointertothenextstructure.Nowgivenalinkedlist,youaresupposedtosortt
i逆天耗子丶
·
2020-09-15 05:37
链表
PAT
(Advanced
Level)
浙江大学
PAT甲级
链表
1052.
Linked
List
So
Linked
List
Sorting
PAT_甲级_1028
1028List
Sorting
Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification
小白界的一股清流
·
2020-09-15 05:56
PAT甲级
PAT (Advanced Level) Practise 1028 List
Sorting
(25)
1028.List
Sorting
(25)时间限制200ms内存限制65536kB代码长度限制16000B判题程序Standard作者CHEN,YueExcelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachca
_Occult_
·
2020-09-15 05:15
PAT甲级
1028 List
Sorting
(25 分)
1028List
Sorting
(25分)Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification
奇迹是执着的人创造的
·
2020-09-15 04:44
PAT
1028 List
Sorting
(25)(25 分)
1028List
Sorting
(25)(25分)Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachcase
码奴生来就只知道前进
·
2020-09-15 04:44
PAT和GPLT
排序
查找
1052 Linked List
Sorting
(25 分)
Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.WeassumethateachstructurecontainsanintegerkeyandaNextpointertothenextstructure.Nowgivenalinkedlist,youaresupposedtosortt
haohao0626
·
2020-09-15 04:28
PAT
甲级
List
Sorting
(25)
原题地址:http://www.patest.cn/contests/pat-a-practise/1028Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachcase,thefirstlineconta
dyeDeny
·
2020-09-15 04:26
PAT
pat 甲级A1028 List
Sorting
(25分)
题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805468327690240题目分析:多混合排序问题。对不同键值进行排序。问题是写比较函数。注意:若将姓名定义成string类型超时。不知道大家有没有出现这样的情况。望指正。string类型无法用printf以及scanf输入或者输出。参考代码:#include#
dutmathjc
·
2020-09-15 04:26
PAT甲级
字符串
leetcode
List
Sorting
1028.List
Sorting
(25)时间限制200ms内存限制65536kB代码长度限制16000B判题程序Standard作者CHEN,YueExcelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachca
xiaowei_nbu
·
2020-09-15 04:15
PAT
A
C语言实现
List
Sorting
(25)
1028.List
Sorting
(25)时间限制200ms内存限制65536kB代码长度限制16000B判题程序Standard作者CHEN,YueExcelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputEachinputfilecontainsonetestcase.Foreachca
a1025461748
·
2020-09-15 04:42
PAT甲级练习
List
Sorting
此题用了Qsort模板,200ms时限,用C++输入输出时超时,改用C,90ms过了#include#include#includetypedefstruct{charid[10];charname[10];intscore;}Student;Studentstu[100005];intn,c;intcmp(constvoid*atmp,constvoid*btmp){//参数必须先写出const
Sup_Heaven
·
2020-09-15 04:25
浙大pat
1028 List
Sorting
字符串比较的坑点
1028List
Sorting
Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification
彼岸小星星
·
2020-09-15 04:52
PAT
1028 List
Sorting
(25 分)
1028List
Sorting
(25分)Excelcansortrecordsaccordingtoanycolumn.Nowyouaresupposedtoimitatethisfunction.InputSpecification
~ 知至~
·
2020-09-15 04:52
PAT甲级
排序
上一页
8
9
10
11
12
13
14
15
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他