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]
.4 Replies
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
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 questionUnknown User•11mo ago
Message Not Public
Sign In & Join Server To View
This thread hasn’t had any activity in 36 hours, so it’s now locked.
Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1191182465792999505