Ad
  • Default User Avatar

    Javascript exhibits this also. Since arrays are pass-by-reference, and the tests use the array after calling the user's function with it, they require the user's solution to leave the items array unmodified.

    It's best practice to not modify arguments anyway (falls under the category of undeclared side effects), but it would be helpful if the tests were more specific in how they failed to tell you you've done a no-no instead of just sounding broken with "got: correct result, expected: wrong result" and leave you sitting there scratching your head trying to figure out why it failed.

  • Custom User Avatar

    What language are you using?