Ad
  • Custom User Avatar

    @nef4r1us

    1.) Your variables positiveCounter and negatives are global; this means that the functions will change each function call. You need to put them in a local scope (inside the function) so that they are "reset" and don't accumulate with time/function calls.

    2.) You need to add a null check and an empty array check at the start of the function. Description states If the input array is empty or null, return an empty array. Use an if statement and check if the input is null or it is empty (make sure the null check precedes the empty array check so errors won't occur).

  • Custom User Avatar

    i don't know too. You said nothing, what's exactly wrong?

  • Custom User Avatar