(1)sum = N + N/2 + N/4 + …… + 1
假设N是2的倍数(N = 2q),则sum = N -1 ~ N
(2)sum = 1+2+……N/2
同(1)分析,sum = N/2 -1 ~ N
(3)N * logN ~ N * logN
(1)sum = N + N/2 + N/4 + …… + 1
假设N是2的倍数(N = 2q),则sum = N -1 ~ N
(2)sum = 1+2+……N/2
同(1)分析,sum = N/2 -1 ~ N
(3)N * logN ~ N * logN
转载于:https://www.cnblogs.com/songdechiu/p/6537372.html