We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Sansa and XOR
- Discussions
Sansa and XOR
Sansa and XOR
Sort by
recency
|
48 Discussions
|
Please Login in order to post a comment
Isnt a great exercise, it requires you to know the attributes of XOR: Namely: Associatitive A^(B^C) = (A^B)^C Commutative A^B = B^A Self inverse: A^A = 0
The first and second example written down, gives you some clue: The 4 elements and up being even number of A's (if you call first number A) and also all other nunebrs. Therefore it will be always 0. The first example written down A,B,C ends up A^B. But not because they are on the edge, but rather the indexes being even.
Rust best solution
If you’re looking for solutions to the 3-month preparation kit in either Python or Rust, you can find them below: my solutions
Python best solution
If you’re looking for solutions to the 3-month preparation kit in either Python or Rust, you can find them below: my solutions
Python 3
Pythonic 1 liner: