Monday, January 16, 2017

Challenge Accepted: Kill K-th Bit



This is my attempt at "Kill K-th Bit" on www.codefights.com



This was a pretty difficult challenge in the beginning. Once I started reviewing bitwise operations, I pretty much had a solution in mind.



At first, I kept getting errors because I was not complementing 1. So what was happening was when I shift 1 over the right amount of bits, then "AND" them together, the Kth bit in N was already 1 it didn't change because 1 + 1 = 1. The only way that I could make it zero is by inverting the shift so that only the Kth bit would change to 0. Meaning if 1 (in binary) shifted and became 00010000, I would have to complement it to make it 11101111 so that none of the other bits are altered. "I hope that made sense".



Challenge Accepted? The Challenge Accepted Video Series is documentation of my attempts on CodeFights Arcade Tasks and Challenges. This also gives good insight into what programmers do on a regular basis (as far as creating a single (or a few) method(s)/procedure(s)).

If you’ve come up with a better solution, log into CodeFights and post it.

https://codefights.com/signup/Cj6u5WynsJpu64RLk/main

Monday, January 2, 2017

Challenge Accepted: Will You?



This is my attempt at the Arcade Task "Will You?" on www.codefights.com



I tried this task at work earlier this week, but it did not work. I could not believe how easy this was. Sometimes, we make things harder on ourselves than it really have to be.



I also created my first entrance video at RenderForest. It took less than 10 minutes to create the video. If you're interested in creating your own entrance video or something similar to this one, you can visit renderforests website: https://www.renderforest.com/signup?afil_link=33398f0a61634f74dd37397e30c7f84e





Challenge Accepted? The Challenge Accepted Video Series is documentation of my attempts on CodeFights Arcade Tasks and Challenges. This also gives good insight into what programmers do on a regular basis (as far as creating a single or (a few) method(s)/procedure(s)).



If you’ve come up with a better solution, log into CodeFights and post it.

https://codefights.com/signup/Cj6u5WynsJpu64RLk/main