Most difficult Code Coach Challenge or programming challenge in general?
For those who have done or are doing the code coach challenges, which did/do you find the hardest?
Or if not a code coach challenge, what other programs have you worked on that have seriously challenged your programming skills?
And why so? Is it because it is difficult to do in that certain language? Or is it just a difficult problem to beguine with?
The reason I’m asking is because there have been a few challenges so far that I haven’t had too much issue with a language like Python but it would seem to be a hassle or much harder to do in a few of the other languages.
One in specific is the word unscrambler problem (a recent addition for pro) that seems to have me struggling to create a list that is in the right order to work. I’ve redone it at least 6 different times each with a different way of creating a list but each time have a different flaw.
Real trouble hasn't yet caused any code coach problem.
There are a few that required quite a bit of code, like the Mathematics problem. Longest so far was the Poker Hand problem, but it was mainly due to the many cases that had to be distinguished. It was simple, but lengthy.
But, writing in C, it is the suspected amount of writing/managing required for the Substring problem had me so far not tackling that problem, although I do have an idea for a solution in mind. (It is just me being lazy and not much interested in writing at the moment anyway). In a higher language, it would certainly be simpler...
In my opinion, the most interesting (or hardest) challenges so far are "Digits of Pi", "Longest Common Substring" and "Word Rank".
Of course you can easily hack them. I myself posted wrong solutions (on purpose) with C, C++, C#, Java and Swift.
They have such amazing potential (with the proper test cases, of course), and are worthy of a good discussion with the amazing coders out there.
I'm also still struggling with pulling off by-hand string permutations in C in that latest addition, or finding a hack around it.
In Python, you do all of that with the turn of a hand.
Or get it done, more like. 😉
I'd say Word Rank, Poker Hand (long for me even in Python) and Longest Common Substring.
For the Word Rank it went ok with permutations from itertools in Python. But in Ruby with built-in permutations I hit "timeout"...not yet resolved. This is why I am looking for alternatives. I found this but I didn't wrap my head around it yet.⬇️
Both of you were saying the digits of Pi would be quite challenging to honestly solve without googling Pi, however I believe there is an equation to calculate Pi (or close to it).
I remember in Math I had to calculate the perimeter of a regular polygon with a radius of 1 but a varying amount of sides.
And as we approached a larger and larger number of sides we also got closer and closer to Pi. So I’m pretty sure you can calculate Pi to a marginal degree of accuracy.
Yeah, Pi would be quite challenging if you approached it honestly.
I prefer to write honest solutions, but in this case it was just too simple to simply google those 1000 places and cram them into an array. 😅
The test cases definitely need refinement (which they'll likely never get (you heard it here first)).