Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    All test are passing except n = 73567465519280238573;
    Seems like a test issue, becasue all other TC are passing.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution