CS50 – Week 3 – Runoff

OK, so runoff seems much easier than Tideman which is so far a fail for me. I did find a few things – Here’s some of the code.

CS50 – Week 3 – Plurality

This one was easy. Perhaps I was supposed to use a fancier algorithm but this gets the job done. Here’s part. A lot of this was supplied as part of the problem statement. Had a stupid range error bug to find which took longer than the solution :(.

CS50 – Week 2 – Substitution

Here’s part of substitution. I found this easier actually than thinking of the decimal to binary conversion. A bit of fiddling and thinking regarding the case of the source text vs the key text.

CS50 – Week 2 – Bulbs

OK, so here’s part of Bulbs. Done. Some annoying Decimal to Binary to research…. Note, the check was failing due to a debug printf I had in the output. Passed once I removed this. So, remove or comment out your debug statements!

CS50 – Week 2 – Caesar

So, here’s Caesar. This was annoying actually. Firstly, need to think about ASCII, characters and integer equivalents which I don’t really want to think about. That’s the thing with learning to code, or perhaps learning anything really. Unfortunately, it seems you have to practice and to practice, you have to do sample problems that give… Continue reading CS50 – Week 2 – Caesar

CS50 Week 1 – Mario

OK, so here’s the easier version of Mario. Probably could be better/simpler, but it works I think. Here’s just part –