Algorithms
Easy
2864
3055
Maximum Odd Binary Number
maximum-odd-binary-number
"""
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.

Example 1:

Input: s = "010"
Output: "001"
Explanation: Because there is just one '1', it must be in the last position. So the answer is "001".

Example 2:

Input: s = "0101"
Output: "1001"
Explanation: One of the '1's must be in the last position. The maximum number that can be made with the remaining digits is "100". So the answer is "1001".


Constraints:

 * 1 <= s.length <= 100
 * s consists only of '0' and '1'.
 * s contains at least one '1'.
"""
class Solution:
    def maximumOddBinaryNumber(self, s: str) -> str:
        
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.

Example 1:

Input: s = "010"
Output: "001"
Explanation: Because there is just one '1', it must be in the last position. So the answer is "001".

Example 2:

Input: s = "0101"
Output: "1001"
Explanation: One of the '1's must be in the last position. The maximum number that can be made with the remaining digits is "100". So the answer is "1001".


Constraints:

 * 1 <= s.length <= 100
 * s consists only of '0' and '1'.
 * s contains at least one '1'.


Please complete the code below to solve above prblem:
```python
class Solution:
    def maximumOddBinaryNumber(self, s: str) -> str:
        
```

my_solution = Solution()

test_input = { "s": "010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "001"

test_input = { "s": "0101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1001"

test_input = { "s": "1" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1"

test_input = { "s": "01" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "01"

test_input = { "s": "10" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "01"

test_input = { "s": "11" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "11"

test_input = { "s": "001" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "001"

test_input = { "s": "011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "101"

test_input = { "s": "100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "001"

test_input = { "s": "101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "101"

test_input = { "s": "110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "101"

test_input = { "s": "111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111"

test_input = { "s": "0010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "0001"

test_input = { "s": "0011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1001"

test_input = { "s": "0100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "0001"

test_input = { "s": "0111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1101"

test_input = { "s": "1000" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "0001"

test_input = { "s": "1001" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1001"

test_input = { "s": "1011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1101"

test_input = { "s": "1100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1001"

test_input = { "s": "1101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1101"

test_input = { "s": "1111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111"

test_input = { "s": "00001" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "00001"

test_input = { "s": "00011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "10001"

test_input = { "s": "00100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "00001"

test_input = { "s": "00101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "10001"

test_input = { "s": "00111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "11001"

test_input = { "s": "01011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "11001"

test_input = { "s": "01100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "10001"

test_input = { "s": "01110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "11001"

test_input = { "s": "01111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "11101"

test_input = { "s": "10000" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "00001"

test_input = { "s": "10100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "10001"

test_input = { "s": "11010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "11001"

test_input = { "s": "11011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "11101"

test_input = { "s": "11110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "11101"

test_input = { "s": "000001" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "000001"

test_input = { "s": "000100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "000001"

test_input = { "s": "000101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "100001"

test_input = { "s": "000110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "100001"

test_input = { "s": "000111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "001100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "100001"

test_input = { "s": "001110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "001111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111001"

test_input = { "s": "010001" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "100001"

test_input = { "s": "010101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "010111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111001"

test_input = { "s": "011010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "011100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "011111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111101"

test_input = { "s": "100100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "100001"

test_input = { "s": "100101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "100111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111001"

test_input = { "s": "101010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "101100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "101101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111001"

test_input = { "s": "110000" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "100001"

test_input = { "s": "110010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "110011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111001"

test_input = { "s": "110100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "110101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111001"

test_input = { "s": "110110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111001"

test_input = { "s": "111000" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "110001"

test_input = { "s": "111010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111001"

test_input = { "s": "111101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111101"

test_input = { "s": "111111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "111111"

test_input = { "s": "0000010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "0000001"

test_input = { "s": "0000100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "0000001"

test_input = { "s": "0001001" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1000001"

test_input = { "s": "0001110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "0010000" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "0000001"

test_input = { "s": "0010101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "0010110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "0010111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1110001"

test_input = { "s": "0011101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1110001"

test_input = { "s": "0011111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111001"

test_input = { "s": "0100100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1000001"

test_input = { "s": "0101001" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "0110010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "0110110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1110001"

test_input = { "s": "0110111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111001"

test_input = { "s": "0111011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111001"

test_input = { "s": "0111101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111001"

test_input = { "s": "1000011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "1000100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1000001"

test_input = { "s": "1000101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "1000111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1110001"

test_input = { "s": "1001100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "1001101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1110001"

test_input = { "s": "1010000" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1000001"

test_input = { "s": "1010100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "1010111" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111001"

test_input = { "s": "1011000" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "1011010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1110001"

test_input = { "s": "1011011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111001"

test_input = { "s": "1100100" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1100001"

test_input = { "s": "1100101" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1110001"

test_input = { "s": "1101010" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1110001"

test_input = { "s": "1101011" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111001"

test_input = { "s": "1101110" }
assert my_solution.maximumOddBinaryNumber(**test_input) == "1111001"