Write a function that counts duplicates in an array.
Anoniem
One approach to this is to grab an element and check it against the segment of the array after the index of said element. Do that until the remainder of the array is gone. This process is approximately 11 times more compute efficient than creating a temp array, pushing in array values and scanning for redundancy on each iteration.