摘要: >Given a list of non negative integers, arrange them such that they form the largest number.>For example, given [3, 30, 34, 5, 9], the largest formed ... 阅读全文
posted @ 2015-07-06 21:47 卖程序的小歪 阅读(138) 评论(0) 推荐(0) 编辑
摘要: >Given an integer, write a function to determine if it is a power of two.这是计算数中1的个数的简版,如果是2的幂的话,二进制中应该只有一个bit为1,即1的count=1。所以这里就不需要用循环了,一次判断即可。但是入参是有符... 阅读全文
posted @ 2015-07-06 09:57 卖程序的小歪 阅读(189) 评论(0) 推荐(0) 编辑