Pergunta de entrevista da empresa Prometheus Group

Find the duplicated elements in a list

Resposta da entrevista

Sigiloso

27 de mai. de 2021

Set a variable called duplicate and initialize it to 0 Create a for loop and iterate through the list Create an if / else statement within the for loop and compare i and duplicate if i and duplicate are not equal, move to the next element in the list and update duplicate to be that element if i and duplicate are equal, then print the answer and exit