其他分享
首页 > 其他分享> > 【leetcode_easy_sort】1356. Sort Integers by The Number of 1 Bits

【leetcode_easy_sort】1356. Sort Integers by The Number of 1 Bits

作者:互联网

problem

1356. Sort Integers by The Number of 1 Bits

solution#1:

code:

 

注意,先按照数字1的数目排序,若相等,则按照整数的大小排序;

参考

1. leetcode_easy_sort_1356. Sort Integers by The Number of 1 Bits;

2. 整数的二进制数据中数字1的个数;

3. __builtin_popcount;

 

标签:sort,Sort,Integers,Number,1356,easy,Bits
来源: https://www.cnblogs.com/happyamyhope/p/14062048.html