|
|
@ -88,7 +88,20 @@ class Diagnostics: |
|
|
|
return oxygen_generator_rating * co2_scrubber_rating |
|
|
|
|
|
|
|
@staticmethod |
|
|
|
def commonality(report: List[int]) -> List[Dict[str, int]]: |
|
|
|
def commonality(report: List[int]) -> List[int]: |
|
|
|
""" |
|
|
|
Return the most common value in each column of binary numbers |
|
|
|
|
|
|
|
Args: |
|
|
|
report: List of binary numbers |
|
|
|
|
|
|
|
Returns: |
|
|
|
List containing the most common value in the column |
|
|
|
Possible Values: |
|
|
|
0 |
|
|
|
1 |
|
|
|
2 - This indicates equally common |
|
|
|
""" |
|
|
|
num_1 = defaultdict(int) |
|
|
|
for binary in report: |
|
|
|
for column, bit in enumerate(binary): |
|
|
|