Search
⌘K

Leetcode 1356. Sort Integers by The Number of 1 Bits

Sort an array of nonnegative integers by the number of 1s in their binary representation (ascending), using the numeric value as a tiebreaker (also ascending); return the sorted array.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.