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.
ruby
test cases is bugged, need fixing:
Random tests
Testing for abbcbcaaab
✘ It should work for random inputs too - Expected: "abbcbcaaab", instead got: "baacacbbba"
Testing for baaaabb
✘ It should work for random inputs too - Expected: "baaaabb", instead got: "abbbbaa"
Testing for caccbcbbbbaa
✘ It should work for random inputs too - Expected: "caccbcbbbbaa", instead got: "cbccacaaaabb"
Testing for aacaacb
✘ It should work for random inputs too - Expected: "aacaacb", instead got: "bbcbbca"
Testing for accbc
✘ It should work for random inputs too - Expected: "accbc", instead got: "bccac"
Testing for cbbbcbbac
✘ It should work for random inputs too - Expected: "cbbbcbbac", instead got: "caaacaabc"
Testing for acaaaabcabbbaccbcaab
✘ It should work for random inputs too - Expected: "acaaaabcabbbaccbcaab", instead got: "bcbbbbacbaaabccacbba"
Testing for bacacbbb
✘ It should work for random inputs too - Expected: "bacacbbb", instead got: "abcbcaaa"
test cases is bugged, need fixing:
Random tests
Testing for abbcbcaaab
✘ It should work for random inputs too - Expected: "abbcbcaaab", instead got: "baacacbbba"
Testing for baaaabb
✘ It should work for random inputs too - Expected: "baaaabb", instead got: "abbbbaa"
Testing for caccbcbbbbaa
✘ It should work for random inputs too - Expected: "caccbcbbbbaa", instead got: "cbccacaaaabb"
Testing for aacaacb
✘ It should work for random inputs too - Expected: "aacaacb", instead got: "bbcbbca"
Testing for accbc
✘ It should work for random inputs too - Expected: "accbc", instead got: "bccac"
Testing for cbbbcbbac
✘ It should work for random inputs too - Expected: "cbbbcbbac", instead got: "caaacaabc"
Testing for acaaaabcabbbaccbcaab
✘ It should work for random inputs too - Expected: "acaaaabcabbbaccbcaab", instead got: "bcbbbbacbaaabccacbba"
Testing for bacacbbb
✘ It should work for random inputs too - Expected: "bacacbbb", instead got: "abcbcaaa"
really, why don't you explain the example then. What's clear in your head, doesn't mean it's clear on others.
nope, totally agreed with you. I am a several year computer science student and I can tell you that there are plenty of missing information. Trying to learn new language and test codewar, but there quite a few bugs on certain challenges. Good job at finding out the issue on this case.
woot, so I am not the only one with this issue
So... How do you make 2 test input arrays equal to the output when they are not...
Test.assert_equals(sort_photos(["2016.img1","2013.img3","2016.img2","2015.img3","2012.img7","2016.img4","2013.img5"]),["2013.img5","2015.img3","2016.img1","2016.img2","2016.img4","2016.img5"])
Test.assert_equals(sort_photos(["2016.img7","2016.img2","2016.img3","2015.img3","2012.img8","2016.img4","2016.img5"]),["2016.img2","2016.img3","2016.img4","2016.img5","2016.img7","2016.img8"])
Same issue. I dont think copying to a new array actually matters.
This comment is hidden because it contains spoiler information about the solution