5 kyu
GA-DE-RY-PO-LU-KI cypher vol 4 - Missing key madness
65 of 99dcieslak
Loading description...
Performance
Algorithms
Ciphers
Cryptography
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Python translation:
Check comment
You might want to add that kind of thing as a test.
Great idea and good Kata's series! Thanks to author!!!
This comment has been hidden.
(Note to kata author: even if you don't like it, this is still an issue and you have no right to close issues citing "I won't fix this" as the reason. Published kata content belongs to the site and the community, not yours. If you don't want to fix it, someone else in the community will anyway.)
I can simply delete the kata so your issue will be solved. I see you guys will never understand it. It's a local cypher used by only one specific language and that's why only these keys are used here. The kata and these keyes have some more symbolic meaning. But anyway, it's like trying to explain molecular physics to a pig ;) Anyway, I don't care. If you wish you can "fix" it. I don't have time for that.
The tests are still easily cheatable.
This comment has been hidden.
not anymore
Python translation.
Work a little bit more on yrou translaiton to be consistent with other languages.
That's complete bullshit. Nothing was fixed.
It's my kata. I don't plan to "fix" it. It works exactly like I want. I don't care what you think is a bullshit.
This comment has been hidden.
This comment has been hidden.
If you're going to talk about how "performance matters", provide some actually useful information, like the input arrays' length (assuming you fix the issue below).
This comment has been hidden.
This comment has been hidden.
No plans to modify it.
Definitely feels harder than 5kyu, even with slight cheating in my solution (assuming any message can only fit 1 secret). Great series of katas, sir!
This was harder than any other 5kyu I have tried.
It was a good puzzle. I used a specific design pattern for the first time since my second CS course.
The indentation in the JavaScript sample tests is a bit off.
Thank you for a very enjoyable series of katas! :-)
I really don’t understand why people vote a kata to be “Not Satisfied” when they haven’t solved it. If you’re not satisfied (which is your prerogative) then please let the author know how they can improve the kata.
Maybe he/she solved the kata but it was too slow to be accepted by the page :) The Random Test rejects nasty solutions. But generally I agree, it should not be possible to score kata when you are not able to solve it.
Unless a kata is labeled
performance
, not being able to solve a kata in time could be the reason why they were dissatisfied by it.This doesn't realy hold up for code-breaking kata of course; they are inherently about performance. Otherwise you could generate random keys and see if they work.
I actually tried solving for all possible keys, but it was a bit too slow for CodeWars. :P (By several, but not even ridiculously many orders of magnitude. If I were the NSA, I could have just bought a bigger computer.)
Still, letting the author know what might be improved would be good form, definitely agree on that.
You might specify that all possible keys are made up of 6 pairs of a vowel and a consonant each. This is not in the description, but it seems to be the case, for no more than ~27 million possible keys (which is why the brute force attack would work on a faster computer).
This comment has been hidden.
I tweaked the brute force key generation attack and got it down to 55 ms (JS). :stuck_out_tongue_closed_eyes: So I submitted it. :innocent:
Even with more words, you should be able to use the word permutation attack in a reasonable time if you filter out permutations as soon as a particular mapping proves impossible. Having longer words actually helps here.
serachForKey
is no doubt a missspelling.It is possible to rig tests so either
searchForKey
orserachForKey
will work. Or you can fix it and simply invalidate one existing solution. (You won't be invalidating mine. :)Thanks! It's fixed. The test should work fine also with misspelled name of function. BTW. Did you misspell the "misspelling" word in your comment?
Yes, yes I did.
I don't dare point out misspellings to people without making a spelling error myself. Perfection is divine, and I'm only human.