Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I think the initial test cases are very deceptive here. There is no indication of multiple mutations of the string until you go to attempt, at which point you are also dealing with extremely long strings. I suspect the instructions could be clearer. Since I honestly cannot solve it as is, though, it is possible I am just missing something.
The kata doesn't make it clear enough that this kata is about reversing an arbitrary, supposedly random bit swapping mapping, not reverse engineering the implementation of
encrypt
. These two directions are vastly different; taking the latter path is completely fruitless, and means wasting a lot of meaningless time.This comment is hidden because it contains spoiler information about the solution
can somebody explain math behind it? how did you even came up with this solution?
There are
10000+
length messages in the random tests. If bits are rearranged in the message, that means a search space of size2 ** 5000
, which can never be solved on CodeWars ( or in the actual Universe ).Or I read something wrong in the description. For which I blame the description, actually.
What am I missing?
It's unclear if I should just be looking at the next characters as in the sample. What about a group 3 that is
['abmxxz', 'abccmxz']
. What would the answer be?You can throw multiple eggs if you want, but only from one floor. Since they are identical, I can't think of a reason to do so unless in (2,14) you just want to throw two eggs from floor 105 at the end so you don't have to carry the last one down.
What have you thought of so far?
The question asks for the highest skyscraper where you can guarantee the highest floor you can drop an egg from. It's possible you cannot even determine if you can throw an egg from the first floor (if you have no eggs or no throws), so in that case you can't guarantee any floors, so the maximum skyscraper height is 0, or no skyscraper. The 'target floor' represents a floor where you can toss the egg from. You can't toss an egg from floor 0 (the first floor is floor 1), but you can report 0 meaning you can't determine the floor for any skyscraper with more than 0 floors.
Um, how do you delete a comment?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
So yes there's a trick to it?
The paths are directly from one letter to another in a straight line. I think of it as 'Blocking' letters, for example E is blocking the path from A to I. If you think about the problem it makes sense because if you tried to move your finger from A to I and had not visited E yet, your finger would move over E and trigger it as the next node. For example if you do
count_patterns_from('A', 1)
and try to do A->I with your finger, you'll run into E and end up with A->E. The problem does mention this at least now:I had the same problem, turns out I missed one of the blocking paths, E blocking H -> B...
Loading more items...