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.
Vacuous Truth. Since there is no 'x', then there is no instance of 'x' followed by anything other than 'y', therefore the condition still holds. Generally, most Katas assume a vacuous truth.
assertTrue(Kata.bestFriend("", 'x', 'y'), "for input: "", 'x', 'y'");
How this is returning True? in that case String txt is empty and there are no chars "x" followed by "y". Thus it should be False.
Explanation:
Since we are checking if "x" is followed by "y", if there is no "x", it can't return True.
Yes, for me too, since I'm not a native speaker and don't have a driver license :) Anywhay "lower or equal" approach is coorect.
Is a little confusing to think, to me too. But after some refactoring I completed this Kata. Think: you are speaking that 110 produces a fine and 100 no. It don't have sense.
80 <= 100 ok
100 <= 100 ok
110 is not < 100
Now you only have to calculate the fees :)
Came here to say this. I could not figure out why my test was failing. Then I just thought about it for a second. But, following the logic, it does fail.
Example (Speed=100, Signals=[110,100,80]-> 250)
output should be 350 since Speed == 100 and 110 and 80 both produce fines - 100 and 250.
Duplicate of the issue by Just4FunCoder, who was faster than me =P
Oh, almost at the same time we posted these issues, lol
N = 2
.No random tests.
Kata lacks novelty. Similar
All test are passing except n = 73567465519280238573;
Seems like a test issue, becasue all other TC are passing.
This comment is hidden because it contains spoiler information about the solution
That's your code's problem, not a kata issue:
Debug it. Somewhere in your code, you're trying to cast an empty string to an integer. That's what the error is about.
This comment is hidden because it contains spoiler information about the solution