2 ms·
In almost all cases you don't need to worry this much about performance. Just traverse the array three times and move on. Go measure and improve if it becomes a
by Waterluvian 7y ago
In almost all cases you don't need to worry this much about performance. Just traverse the array three times and move on. Go measure and improve if it becomes an issue.