Pergunta de entrevista da empresa Booz Allen Hamilton

Write a function that counts duplicates in an array.

Resposta da entrevista

Sigiloso

26 de jun. de 2019

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.