#3309

Maximum Possible Number by Binary Concatenation

medium · 65.5% accepted · 115 likes · top 70%

array · bit manipulation · enumeration

⊣ practice⊣ open on leetcode ↗

Description

You are given an array of integers nums of size 3.

Return the maximum possible number whose binary representation can be formed by concatenating the binary representation of all elements in nums in some order.

Note that the binary representation of any number does not contain leading zeros.

Solution