Ad
  • Custom User Avatar
  • Custom User Avatar

    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"

  • Custom User Avatar

    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"

  • Custom User Avatar

    really, why don't you explain the example then. What's clear in your head, doesn't mean it's clear on others.

  • Custom User Avatar

    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.

  • Custom User Avatar

    woot, so I am not the only one with this issue

  • Custom User Avatar

    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"])

  • Custom User Avatar

    Same issue. I dont think copying to a new array actually matters.

  • Custom User Avatar

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