Tap here to switch tabs
Problem
Submissions

Problem: Maximum Possible Number by Binary Concatenation

Maximum Possible Number by Binary Concatenation asks you to order integers, join their binary representations into one string without leading zeros, and return the greatest decimal value possible.

Statement

You are given an array of integers nums of length 33.

Concatenate the binary representations of all numbers in nums in any order to form a single binary string, without leading zeros.

Return the maximum decimal value that can be obtained from any such concatenation.

Constraints:

  • nums.length =3= 3

  • 1≤1 \leq nums[i] ≤127\leq 127

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Possible Number by Binary Concatenation

Maximum Possible Number by Binary Concatenation asks you to order integers, join their binary representations into one string without leading zeros, and return the greatest decimal value possible.

Statement

You are given an array of integers nums of length 33.

Concatenate the binary representations of all numbers in nums in any order to form a single binary string, without leading zeros.

Return the maximum decimal value that can be obtained from any such concatenation.

Constraints:

  • nums.length =3= 3

  • 1≤1 \leq nums[i] ≤127\leq 127