Update 桶排序.cpp

master
p6voizrua 3 years ago
parent 4628089ca2
commit fe198c160b

@ -47,3 +47,17 @@ int main()
int size = sizeof(raw) / sizeof(int); int size = sizeof(raw) / sizeof(int);
bucket_sort(raw, size, 10); bucket_sort(raw, size, 10);
} }
/*三、桶排序算法特点
1.
22NNM
O(N^2)O(NlogN)O(NlogN)N/M*log(N/M)*M
3N+M+N/M*log(N/M)*M3N+M+N(logN-logM)O(N+M+N(logN-logM))
2.
O(N+M)
3.
*/

Loading…
Cancel
Save