dmikester1 – 00-53 Jan 1

I have an array of numbers that looks like this: [36, 4, 40, -40] I want to remove all numbers that sum out to zero. So in that example, I would want to remove -40 and 40 to return [36, 4].
Unknown User108d ago
dmikester1108d ago
It's not actually. 🙂 Trying to figure it out for my job. I guess I can walk through the array and add 1 at a time to a new array. And check if -1 * nextNum equals a number in the array, remove both. Not really sure what I would type into Google for that specific question
Unknown User106d ago