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.
This comment is hidden because it contains spoiler information about the solution
Consider the number being a string. I successfully tested with rand(10 ** 1000,10 ** 2000);
Kata is not bugged, your solution is terribly slow.
Count how many IP addresses is between "8.10.203.44" and "243.51.7.233".
Not a kata issue.
This comment is hidden because it contains spoiler information about the solution
If by
long
you mean 64 bit, signed integer (you did not mention your language), then 59884848459853 is not too big. It does not throw error in my IDE."Permutations approach" is very appropriate for this kata, just not iterating through all possible permutations.
There is this number in 'biggerTests' 59884848459853, isn't it too long for long? I mean when i try to test this one code in my IDE with this num it just throws an error. Anyway i guess permutations approach is not well for this kata...
Well, is this really 7kuy? I think it should have been 8 kuy. Anyway, nice kata.
Ah, I get it. I will do that. Thank you.
Run your solution in your IDE two times, test1 and test2 one after another in one run.
No, I just solved the kata in C# and it worked for me as expected, so I am closing this as not a kata issue. Try to find error in your solution, and if you can't find any, post your code here.
are you testing an older version of your solution and have a newer one on VS?
I'm using C#
When I do this on Visual Studio it works.
But when I run the test it says I'm getting test2 wrong.
Here's the output:
Test2
Test Failed
Expected string length 56 but was 129. Strings differ at index 13.
Expected: "Burger Fries Fries Chicken Pizza Sandwich Milkshake Coke"
But was: "Burger Fries Chicken Pizza Pizza Pizza Sandwich Milkshake Mil..."
But on Visual Studio I'm getting: "Burger Fries Fries Chicken Pizza Sandwich Milkshake Coke" which looks correct to me.
Anyone else having this problem on C#?
This comment is hidden because it contains spoiler information about the solution
Yeah so the strings get upto like 10000 which I presume is the problem. The way I see it you have two options:
Try in a different language with less perfomance requirments (python strings only go to like 150 chars - my O(n^8) solution passes in under a seccond)
Try to reduce the complexity of your solution (how many times you have to iterate through the input). You could post your code in a spoiler but I don't like java so can't really help (someone else might though). You need to think about how to reduce the number of times you scan through the input. e.g. looking for all the burgers and then starting over and looking for all the fries etc will probably time-out in java.
give up (not a real option) 😦
Good luck 😁
It's Java
Loading more items...