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.

1/14/2020 7:44:50 PM


7 Answers

New Answer


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.⬇️ HonFu Pie https://brilliant.org/wiki/rank-of-a-word-in-dictionary/


Diego HonFu 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.


Pie, I assumed that 'quite accurate' would not be good enough for the test cases, especially if you take float inaccuracies into account.


Coder Kitten, three lines in my Python version. 😂 I'm sure you could oneline it as well.


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)).