Ad
  • Custom User Avatar

    JS

    • Tests should not test for instance.hasOwnProperty(method). This is bad practice as methods should be defined on the prototype, not on the instances;
    • Tests should be updated to the new framework (mocha + chai).
  • Default User Avatar

    Sample tests raise exceptions in test_functions (no function.func_name attribute).

  • Custom User Avatar

    python at least, but I'd bet on a general problem:

    • needs more edge cases. For instance, tests for max and min with huge positive and negative values needs to be added
    • needs tests inserting 0, while current max>0 and another with current min<0, to filter out some wrong logics
    • needs more random tests to no check only one single random value (even if checked thausends of times, that's still one only value
    • correctness of the returned values need to be tested in the "random" tests too
    • use Test.assert_approx_equals for float values.
    • the test for O(1) for get_mode isn't implemented correctly: I see things that are not O(1) at all that are passing the perf test. => needs thousands of different kinds of temperatures too. Correction, seems correct since those things were actually in the insert method, I didn't pay enough attention. Tho, that would need a check, maybe, and that could be interesting to put some restrictions on the insert function too, if the goal is to aim for performances... :/
  • 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