Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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.
@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!
I saw you note in the Fixture. Thank you! @donaldsebleung
Thank you suic! Already approved.
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.
Thanks for JohanWiltink's feedback. A simple random-test is added now.
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!
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.
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