+ 3

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.

14th Jan 2020, 7:44 PM
Pie
Pie - avatar
8 Respostas
+ 5
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.
14th Jan 2020, 9:58 PM
Diego
Diego - avatar
+ 4
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. 😉
14th Jan 2020, 7:48 PM
HonFu
HonFu - avatar
+ 4
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/
14th Jan 2020, 8:56 PM
Mihai Apostol
Mihai Apostol - avatar
+ 4
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.
14th Jan 2020, 10:47 PM
Pie
Pie - avatar
+ 4
Pie, I assumed that 'quite accurate' would not be good enough for the test cases, especially if you take float inaccuracies into account.
14th Jan 2020, 10:54 PM
HonFu
HonFu - avatar
+ 1
Coder Kitten, three lines in my Python version. 😂 I'm sure you could oneline it as well.
14th Jan 2020, 8:21 PM
HonFu
HonFu - avatar
+ 1
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)).
14th Jan 2020, 10:15 PM
HonFu
HonFu - avatar
0
I just finished the Longest Word Code Crunch challenge and thought that was the hardest thus far. Took quite a bit of noodling and a little help from online resources to manipulate the dictionary in the right way!
20th Nov 2020, 7:46 PM
Matt Colletta