hah! Sorry, I had "console.log(count)" in my code because I was checking the output after every loop. Looks like I left it in there by accident. Submitted it now and there was no problem.
Hello, I've not failed any tests. Yet it says this:
Max Buffer reached: Too much information has been written to stdout.
Process exited prematurally with a SIGKILL signal.
Does anyone know what this means?
It wouldn't let me use reduce either. Instead I had to sum the values of the array using another for loop. Try that and it will pass.
This comment is hidden because it contains spoiler information about the solution
I thought the same thing!!
Can someone show me how to solve this recursively?