mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 00:22:55 +08:00
Update 1356.根据数字二进制下1的数目排序.md
remove TODO for comparator
This commit is contained in:
@ -139,7 +139,6 @@ class Solution {
|
|||||||
.sorted(new Comparator<Integer>(){
|
.sorted(new Comparator<Integer>(){
|
||||||
@Override
|
@Override
|
||||||
public int compare(Integer o1, Integer o2) {
|
public int compare(Integer o1, Integer o2) {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
int cnt1 = cntInt(o1);
|
int cnt1 = cntInt(o1);
|
||||||
int cnt2 = cntInt(o2);
|
int cnt2 = cntInt(o2);
|
||||||
return (cnt1 == cnt2) ? Integer.compare(o1, o2) : Integer.compare(cnt1, cnt2);
|
return (cnt1 == cnt2) ? Integer.compare(o1, o2) : Integer.compare(cnt1, cnt2);
|
||||||
|
Reference in New Issue
Block a user