Available question text
Rearrange the bits of a binary string (which contains at least one '1') to form the largest possible odd binary number; since oddness requires the last bit to be '1', reserve one '1' for the end and maximize the prefix by placing the remaining '1's in the most significant positions.
Related questions
Continue with questions that share topics or the same question type.
- Maximum Possible Number by Binary Concatenation
Coding
- All the Pairs With the Maximum Number of Common Followers
Coding
- Binary Number with Alternating Bits
Coding
- Binary Tree Maximum Path Sum
Coding · Binary Tree · Depth-First Search · DP on Trees
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2864. Maximum Odd Binary Number
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source