Ad
  • Custom User Avatar

    1.) You're putting the array in the 'for' loop, which means it will replace the previous sumArray (replacement of the variable). Put it outside the 'for' loop.

    2.) You don't want to break if they are a multiple of 3 and 5. You should just push this number to the array instead.

  • Custom User Avatar

    Hi guys, I'm having a timeout error for this question even though I passed the samples.

    I am using a for-loop to evaluate the multiplies of 3 or 5. Is there a more efficient way of solving this question?

    Thank you for sharing everyone :)