Ad
  • Custom User Avatar

    You haven't written anything for your kata beyond the title. Please actually finish writing your kata before publishing to beta.

  • Custom User Avatar

    Random tests are needed.

  • Custom User Avatar

    The unit of x and phase is not mentioned. They're apparently different (x is in angular wavenumber, phase is in radians)

  • Custom User Avatar

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

  • Custom User Avatar

    a sequence of strings, representing all absolute paths of the given length leading to the directory pointed by the given canonical path

    Tests strictly requires return type to be a set, rather than a sequence (which would be a iterable). A set is also not a sequence, so the output as specified by the description is misleading.

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    Looks good now

  • Custom User Avatar

    This is supposed to be a performance kata but author solution (aka reference solution) is inadequate: it is O(log(n)*k) even though a relatively simple O(log(n)*log(k)) solution exists, as demonstrated by some solutions. The random tests are slowed by a lot by the reference solution as a result.

    Please replace the reference solution with an algorithm with optimal time complexity and bump up the range of k to make sure this is enforced.

  • Custom User Avatar

    Please fix the sample tests:

    File "/workspace/default/tests.py", line 5
        def fixed_tests:
                       ^
    SyntaxError: expected '('
    
  • Custom User Avatar

    There should be specifically a set of random tests that probe solutions against these overlapping cases.

  • Custom User Avatar

    that's why there are also randomized tests in the suite, so they can't be hardcoded

    Yes, but if the random tests can be passed by a simplier, incorrect algorithm then the random tests are too weak, which is the issue here.

    Notably, I can still pass the entire suite with my incorrect solution just by hardcoding for the 2 additional fixed tests.

  • Custom User Avatar

    You may assume that a solution for x exists and is unique.

    Why x needs to be unique? Yes, every solution except mine can't handle non-unique solutions (e.g a = 6, b = 24), but then you're arbitrarily limiting input a to be odd, and it doesn't add anything to a correct solution since the test accepts all correct xs anyway (it only checks a * x == b).

  • Custom User Avatar

    run_test_case is from preloaded, not solution. solution implicitly imports preloaded, but importing it from solution means user can supply their own implementation which overwrites the entire testing mechanism.

  • Custom User Avatar

    Actual tests aren't random. It's testing a fixed, linear sequence of numbers.

  • Loading more items...