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.
.
Additional test cases added
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#?
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
Which language?
Hello everyone! I'm kind of stuck in here. When i run my code through random tests it times out. I understand that my algorithm might not work fast with VERY LARGE strings, but this (input) String seem not to finish. I must be missng something and i hope someone could help me, because i don't want to give up on this one.
Peace and love!
ah, i see, it returns a float by default within that context, thanks
The answer is in the error message, depending of the length that number can be a float.
Using python, can expressions not be used for slice indices?
I understand expressions can be used wherever values can also be used
like so, trying this in my solution to check if string is already a palindrome:
if s[:len(s)/2 + 1] == s[len(s)/2:]:
return "OK"
I get:
"TypeError: slice indices must be integers or None or have an index method"
This comment is hidden because it contains spoiler information about the solution
Loading more items...