码迷,mamicode.com
首页 > 其他好文 > 详细

返回数字二进制的最高位位数o(n)

时间:2016-08-06 17:41:01      阅读:113      评论:0      收藏:0      [点我收藏+]

标签:

for(int i = 2; i < N; ++i)
    nexte[i] = (i == (i & -i)) ? nexte[i - 1] + 1 : nexte[i - 1];//nexte数组中储存的即是i的二进制最高位的位数

 

返回数字二进制的最高位位数o(n)

标签:

原文地址:http://www.cnblogs.com/shimu/p/5744314.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!