Ad
  • 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

  • Custom User Avatar

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

  • Custom User Avatar

    I don't think this would be a confuse to users, as I mentioned ahead that all the elements in arrays are numbers. Saying "sorted in asc orders" really means from smallest to the largest. An explanation of this "asc order" could be found here: http://www.mathsteacher.com.au/year7/ch02_power/06_asc/asc.htm

    Hope this could be some help.

  • Custom User Avatar

    @JohanWiltink I got that, since the running order is Preload -> User Solution -> Test Cases, and that's how users might cheat by just making a reference to the solution given in advance. I should think of that... Thanks for the remindering!

  • Custom User Avatar

    I saw you note in the Fixture. Thank you! @donaldsebleung

  • Custom User Avatar

    Thank you suic! Already approved.

  • Custom User Avatar

    Another lesson! Thank you for the detailed explanation!

    I've revised the tests, moving all the pre-settings into PRELOAD area. For user solution, only copied arrays, from slice() method, are passed in as arguments. No more effects on the original ones.

  • Custom User Avatar

    Thanks for JohanWiltink's feedback. A simple random-test is added now.

  • Custom User Avatar

    I just set a very basic random test, and you can find it in "Test cases" above. And the approach you showed me before didn't pass the test.

    I'm not sure if this random test is robust enough for use, but I'll keep watching it. Please let me know if you have good suggestions or find other issues. Thank you!

  • Custom User Avatar

    Well, solving a problem only needs one possible solution. But doing tests requires considering more. I might be able to solve another 138 kata, and still have no idea of how to set testings...

    I have little experience in testing or debugging while I do have a few ideas to solve a certain problem. Although I did read others' test-cases before publishing mine, I didn't think of all the necessary tests for this kata. It may be basics to you, but not exactly to me. And if you feel this kata wasting your time, I apologize... and still thank you for finishing it and give feedback. I'll fix the issues tomorrow morning, and do better next time.

  • Custom User Avatar

    Thanks for the info. Actually it's my first kata...still not familiar with the test process and methods. Anyway I'll figure it out later