Hey everyone, just a heads-up — I followed the instructions exactly as written, especially this part:
"Odd parity ➝ parity bit = 0 if 1s are odd, 0 if even."
But when I submitted my solution, it didn't pass all the tests.
After checking the test cases, it looks like they're actually based on standard parity rules, not the ones described in the task. Here's the correct logic:
Even parity ➝ parity bit = 0 if 1s are even, 1 if 1s are odd.
Odd parity ➝ parity bit = 1 if 1s are even, 0 if 1s are odd.
So if your implementation is failing tests even though you followed the instructions, try switching to the standard parity logic instead.
Hey everyone, just a heads-up — I followed the instructions exactly as written, especially this part:
But when I submitted my solution, it didn't pass all the tests.
After checking the test cases, it looks like they're actually based on standard parity rules, not the ones described in the task. Here's the correct logic:
0if 1s are even,1if 1s are odd.1if 1s are even,0if 1s are odd.So if your implementation is failing tests even though you followed the instructions, try switching to the standard parity logic instead.