Clarify how encrypt(bitsString) rearranges the bits? Does it follow a fixed pattern for all inputs of the same length? like bro its not even clear enough to understand.
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.
There are 10000+ length messages in the random tests. If bits are rearranged in the message, that means a search space of size 2 ** 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.
Step 3: Pick out the duplicate characters in the first string and the other string, and then pick out the duplicate characters in the second string and the other string, and then third.. and so on..:
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.
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.
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:
Take into account that dots/points can only be connected with straight directed lines ...
Clarify how encrypt(bitsString) rearranges the bits? Does it follow a fixed pattern for all inputs of the same length? like bro its not even clear enough to understand.
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:Loading more items...