Ad
  • Custom User Avatar

    Thanks a lot, myjinxin2015.
    Bug in the test was successfully fixed.

    Now list is always shuffled.

  • Custom User Avatar

    There is only one test.
    And its called now 50 times with different number of list items. (I had add 29 more tests)
    From few items up to 199999 or close to this number. (there is random number of "not main category" items, so cannot tell for sure)

    I had check my code with additional load (tried to check list with close to 1999999 items) and its fail with the same error as yours.
    So absolutely sure you have too slow algorythm and you need to improve it for pass this kata.

  • Custom User Avatar

    All the tests used absolutely the same code for random generation of the List<> items.
    So absolutely sure they all are correct :)

    My code giving the following result:
    21 Passed
    0 Failed
    0 Errors

    Process took 523ms to complete

    Try to run once more.
    If this will not resolve your issue - possibly, you have problems with your algorythm and you need to optimize your code and make if faster.

  • Custom User Avatar

    much more horible solution :D Have no idea who mark it as best practice :D

  • Custom User Avatar

    Too difficult logic, too much code for such task. Cannot be best practice.

  • Custom User Avatar

    This solution must not pass! Looks like author didnt write correct tests for such solutions.
    (its using in bank only 25$ money, even if people giving 50$ money or 100$ money)

  • Custom User Avatar

    Clever, but too hard to read the code.
    So "clever", but not the "best practice" absolutely sure. Good code -- easy for read code first at all. Shortest code is not always easy to read.

  • Custom User Avatar

    This code is short and clever, but... I dont think that this is best practice as it's relatively hard to read. Need to think a little to understand what do you mean by the code.

    So absolutely sure this is CLEVER solution, but absolutely sure NOT best practice.
    Short code not always is the best. Best practice is EASY FOR READ at first and short as second.

  • Custom User Avatar

    Are you sure that tests for this cata (c#) is correct?

    algorythm is pretty easy to do as 2 loops one in another.
    Any my soluton works great for first 10 strings absolutely correctly. But its fails on your tests

    Assert.AreEqual(74088,Kata.rowSumOddNumbers(42));

    and with higher input param.