0
点赞
收藏
分享

微信扫一扫

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

爪哇驿站 2022-07-12 阅读 68

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​​;

 

举报

相关推荐

0 条评论