Practice Maximum Odd Binary Number
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are given a binary string s that contains at least one '1'. You have to rearrange the bits in such a way that the resulting binary number is the maximum odd binary number that can be created from this combination. Return a string representing the maximum odd binary number that can be created from the given combination. Note that the resulting string can have leading zeros.
Source: Maximum Odd Binary Number on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
s = "010"
"001"
# Example 2
s = "0101"
"1001"
Constraints
Related LeetCode Problems
Practice more problems similar to Maximum Odd Binary Number.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.