Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    \$\begingroup\$ It appears that all existing test cases happen to work when XOR'ing in decimal as well. Suggested test case: 1100100001000000 -> [1, 2, 4]. \$\endgroup\$ Commented Dec 9, 2020 at 15:29
  • \$\begingroup\$ @Arnauld ​Added \$\endgroup\$ Commented Dec 9, 2020 at 15:33
  • \$\begingroup\$ @user253751 "XOR'ing in decimal" was a shortcut. I meant "XOR'ing the numbers parsed in decimal instead of binary", e.g. doing 1000 xor 100 (which is 908, or 0b1110001100 in binary) instead of 0b1000 xor 0b100 (which is 0b1100, or 12 in decimal). \$\endgroup\$ Commented Dec 10, 2020 at 16:44