LeetCode 1356: Sort by Number of 1 Bits

Sort an array by the count of 1s in binary representation, ascending order. Break ties by numerical value. 🔢

LeetCode 1356: Sort by Number of 1 Bits
Math Geeks
1.1K views • Sep 19, 2020
LeetCode 1356: Sort by Number of 1 Bits

About this video

Given an integer array arr. You have to sort the integers in the array in ascending order by the number of 1's in their binary representation and in case of two or more integers have the same number of 1's you have to sort them in ascending order.

Return the sorted array.



####################################
Please subscribe to my channel
My other Leetcode solving videos (easy)
https://www.youtube.com/playlist?list=PLg9w7tItBlZt4oUpNyWU_0rOItlScu1_d


Leetcode solving videos (Medium):
https://www.youtube.com/playlist?list=PLg9w7tItBlZvMGxy-y1eXURPD6Ao6kkzA

Leetcode solving videos (Hard):
https://www.youtube.com/playlist?list=PLg9w7tItBlZt4JQmlkGD3M5idZn14NyL6

Tags and Topics

Browse our collection to discover more content in these categories.

Video Information

Views

1.1K

Likes

5

Duration

3:03

Published

Sep 19, 2020

User Reviews

3.9
(1)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.