5 ms·
I hate little puzzles like this when presented in isolation, my brain just bounces off them. If the EXACT same puzzle was presented as part of a real problem w
by simonbarker87 3y ago
I hate little puzzles like this when presented in isolation, my brain just bounces off them.
If the EXACT same puzzle was presented as part of a real problem with context and reasons, my brain would be all over it and I'd work out a solution.
As another comment says, it will inevitably show up as a coding interview, one that I would likely fail!
- bluefirebrand 3y agoYeah, I agree I tried doing leetcode for a while but basically just get bored of it My brain is wired to solve problems and puzzles, but not in isolation. Removed of context I just can't convince myself there's any value in it and I bounce off just as you describe
- simonbarker87 3y agoYep, the best solution to a puzzle is to just not do it as far as my brain is concerned!
- toppy 3y agoThe broader contexts could be this: look at this puzzle as a way for reinvent sorting as a delegation of operations (split + combine) instead of traditional "swapping" of values. As CPU arithmetic is faster then memory operations some real treasure may be hidden in this new approach.
- Thiez 3y agoThat is clearly nonsense, as the results of performing the arithmetic still need to be written back to memory, so it's just a swap with extra operations. See also the xor-swap.
- TillE 3y agoI agree, but I enjoyed doing Google's semi-secret random-invite-only "Foobar" challenge, which gives you a series of coding problems with a silly story attached. I think even that very minimal structure helps mentally elevate it from a boring math problem to a "real" scenario.
- norir 3y agoI came here to post that I think this game is an evil ddos attack.