RE: Bit flipping
April 24, 2016 at 12:05 am
(This post was last modified: April 24, 2016 at 12:06 am by SteelCurtain.)
(April 23, 2016 at 11:55 pm)Tiberius Wrote: Honestly, it seems to me like she was just trying to be difficult. Like Cthulhu said, there's no point in optimizing that code. Using if statements are just as valid a way of writing it, and in fact might be the more preferable way of writing it since it's more obvious to people what the code does.
I agree. There's not a need to optimize the code to this degree. I think if you use extra ifs and else statements, you'll lose one or two points, get a 23-24/25. The only way to get a perfect score is to have it optimized.
I'm a perfectionist and it is 100% against my nature to leave a problem unsolved if I think I can get it. If I were strapped for time, I'd have left it as it was. My code worked just fine with that if-else included.
"There remain four irreducible objections to religious faith: that it wholly misrepresents the origins of man and the cosmos, that because of this original error it manages to combine the maximum servility with the maximum of solipsism, that it is both the result and the cause of dangerous sexual repression, and that it is ultimately grounded on wish-thinking." ~Christopher Hitchens, god is not Great
PM me your email address to join the Slack chat! I'll give you a taco(or five) if you join! --->There's an app and everything!<---
PM me your email address to join the Slack chat! I'll give you a taco(or five) if you join! --->There's an app and everything!<---