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