Ad
  • Custom User Avatar
  • Custom User Avatar

    Current input range of the kata is too small. 10^6 entries can be easily enumerated inside the time constraint by enumerating in binary, and there is only 1 fixed test with input 10^7. The only acceptable performance here is O(log n) here if performance is required (implied to be so, otherwise the 10^7 input is unnecessary).

    Besides, most current solutions don't work when the result is past Number.MAX_SAFE_INTEGER (and this is really a JS only thing), so either way the input should be pushed higher (BigInt will be useful for this).

  • Custom User Avatar

    Input range should be specified for a performance kata.

    consider to use a cache mechanism that balances performance and memory usage

    I hate to say this, be please don't give false performance "tips" in description, especially if you cannot up with a solution with satisfactory performance (one could even argue that you probably should seek assistance before creating said kata). There are many more submitted solutions that are both much better and do not require such assumptions.

  • Custom User Avatar

    $this->assertEquals('', $output, 'The class should not print in output');

    This is not mentioned anywhere, and the fact that logging to console is prohibited is ridiculous.

  • Custom User Avatar

    Random testcases added for JavaScript - the tests were already completely parametrised anyway.

    PHP tests could use an overhaul in the same way.

  • Custom User Avatar

    You have some undocumented specs there:

    • Class constructor requires input to be declared array type
    • Url has to be encoded
    • Following the above, only password field and query part are tested