Ad
  • Custom User Avatar

    Can you post the VIN number? Did it happen on the Random Tests or Fixed Tests?

  • Custom User Avatar

    Thanks for the translation!

  • Custom User Avatar

    The vin number 8WXSY7WGXBM122383 should return False, it is invalid. The check digit is X but it should be 7.

  • Custom User Avatar

    You can add a print(number) statement at the beggining of your function, so you can see which inputs are passing and which ones are failing.

  • Custom User Avatar

    I understand your point, but this Kata is looking for the fastest possible solution, all other solutions are meant to Time Out.

  • Custom User Avatar

    I believe I finally managed to fix it. Tested your provided solution and it no longer passes.

    • Tuned tests so O(log n) solutions don't pass.
  • Custom User Avatar

    I'm believe I'm missing the point, shouldn't the fastest implementation be prefered for the test suite, aren't we trying to measure the users code performance? And what is the advantage of going O(log n)?

  • Custom User Avatar

    Ok, I see what you mean now, I'm gonna change the random tests suite to match your code.

    very bad idea: doing so you're changing drastically the perf requirements. What do you think, the random tests parameters should be? Keep it at 10,000 now that thes tests were silenced or change it to another value?

    As you can see, I'm no expert programmer, but I believe the current test suite solution is already O(1).

  • Custom User Avatar

    Good point!

    • Changed the first test case to match the description example

    Thanks for the input

  • Custom User Avatar

    You are correct, the description should contain line segment instead of line.

    • Replaced line by line segment in the Kata description
  • Custom User Avatar
  • Custom User Avatar
    • Added an "Input Validation" section to the description of the Kata
    • Renamed "Edge Cases Tests" to "Input Validation Tests"

    Thanks for the input

  • Custom User Avatar
    • Reduced the amount of assertions to 1000
    • Changed random tests loop to break on first wrong answer
    • Added and separated fixed tests into small and large numbers tests

    And what do you mean exactly by "add one passing assertion at the end of the loop^, when all answers are good"?

    Thanks for the input

  • Custom User Avatar

    I'm sorry for not stating clearly on the description.

    Lines touching one of vertices of the rectangle, should return True, because that point is both on the line as well as the rectangle.

    Thanks for the heads up, fixed the description to make it clearer for other Warriors.

  • Custom User Avatar

    Unpublished this one, and kept only the Squared Spiral#1

  • Loading more items...