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.
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.
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
Loading collection data...
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.
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.
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
This comment is hidden because it contains spoiler information about the solution