Ad
  • Custom User Avatar

    It might be nice to add a note to the task description that the algorithm should perform well in the worst possible scenarios. I was expecting the input cases to be more random where some specific spatial data structures could be useful but then I saw this mesh of death with ~20k intersecting lines 😅 I wish I had known this test beforehand 😄

  • Custom User Avatar

    The number of random tests for Java needs to be increased.

    This solution fails roughly once every 20000 random tests (estimated), but it often passes as there are only 150 random tests currently.

  • Custom User Avatar

    I tried my hand at making an appropriate C translation.

    Since this is my first C translation it should be reviewed carefully.

  • Custom User Avatar

    Random tests are too weak: incorrect solutions like this can still pass after repeated submissions.

    At least the number of random tests should be bumped up, or more difficult random test cases should be generated.

  • Custom User Avatar

    Test fixture needs fixing (sample tests have this error too):

    /workspace/default/tests.py:257: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
    Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
      inp = np.array(inp, dtype=np.bool)
    /workspace/default/tests.py:129: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
    Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
      inp = np.array(inp, dtype=np.bool)
    /workspace/default/tests.py:180: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
    Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
      result = np.zeros(shape=(rn, cn), dtype=np.bool)
    /workspace/default/tests.py:190: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
    Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
      res = np.array(res, dtype=np.bool)
    

    This is blocking the kata from being updated to Python 3.11.

  • Custom User Avatar

    The description is not displaying powers correctly, like 232 -> 2^32 and 109 -> 10^9.

  • Custom User Avatar

    TODO:

    • Test against a range of possible lengths
    • Check over overwriting past the end
    • Seed with getrandom(2)

    See test cases for https://www.codewars.com/kata/636b75101b60ba002e3953e2

  • Custom User Avatar

    TODO:

    • Test against a range of possible lengths
    • Check over overwriting past the end
    • Seed with getrandom(2)

    See test cases for https://www.codewars.com/kata/636b75101b60ba002e3953e2

  • Custom User Avatar

    TODO:

    • Test against a range of possible lengths
    • Seed with getrandom(2)

    See test cases for https://www.codewars.com/kata/636b75101b60ba002e3953e2

  • Custom User Avatar

    TODO:

    • Test against a range of possible lengths
    • Check over overwriting past the end
    • Seed with getrandom(2)

    See test cases for https://www.codewars.com/kata/636b75101b60ba002e3953e2

  • Custom User Avatar

    TODO:

    • Test against a range of possible lengths
    • Check over overwriting past the end

    See test cases for https://www.codewars.com/kata/636b75101b60ba002e3953e2

  • Default User Avatar

    Incomplete floating point values are printed in case of errors in Rust test cases. For example, for underlying values -1152921504606846848.0 (left) and -1152921504606846976.0 (right) I get the following assertion:

    assertion failed: `(left == right)`
      left: `-1.1529215046068468e18`,
     right: `-1.152921504606847e18`
    

    Neither of the values printed to screen represent the values stored in memory. I suggest something like:

    fn ff64(f: f64) -> String {
       format!("{:.64}", f).trim_end_matches('0').trim_end_matches('.').to_string()
    }
    
    fn main() {
        let a : f64 = -1152921504606846848.0;
        let b : f64 = -1152921504606846976.0;
    
        println!("A [{}] B [{}]", ff64(a), ff64(b));
    }
    
    Output: A [-1152921504606846848] B [-1152921504606846976]
    
  • Default User Avatar

    The completed count for this kata has stalled. Suggest to move it to 5 kyu, because it seems only few rank it as 6 after reading the description.

  • Custom User Avatar

    Very informative kata, thanks to @dramforever! Pity it has not received much attention over the last five years.

    Here are some minor issues:

    • Function and variable names should use camelCase.

    • Node v18 should be enabled.

    • chai and assert should be used.

  • Custom User Avatar

    I found this problem very interesting (I have never attented a logic class, so I always enjoy this kind of exercise where I can learn a bit more about the topic).
    But I must admit I find the exercises too short w.r.t. the length of the "details" section. Would it be possible to reason more about the system (in this kata, or another)? That would allow to better understand the system, and have more fun playing with it.

  • Loading more items...