From 0637bca7ecfbbf8cb2ec2049b7d37f40c2b56dd0 Mon Sep 17 00:00:00 2001 From: pmkfqw2gu <2511089200@qq.com> Date: Thu, 17 Feb 2022 22:09:02 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E5=9F=BA=E6=95=B0=E6=8E=92=E5=BA=8F.c?= =?UTF-8?q?pp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 基数排序.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/基数排序.cpp b/基数排序.cpp index 702a698..11403e8 100644 --- a/基数排序.cpp +++ b/基数排序.cpp @@ -1,3 +1,15 @@ +10.基数排序 + +10.1 描述 +基数排序是按照低位先排序,然后收集;再按照高位排序,然后再收集;依次类推,直到最高位。 +有时候有些属性是有优先级顺序的,先按低优先级排序,再按高优先级排序。最后的次序就是高 +优先级高的在前,高优先级相同的低优先级高的在前。 + +10.2 复杂程度 +时间复杂度O(n*k) +空间复杂度O(n+k) + +10.3 代码 #include #include #define N 14 //数组长度 @@ -58,3 +70,6 @@ int main() printf("\n"); return 0; } + +10.4 运行时间 +0.02213s