Find the duplicated elements in a list
Anonymous
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
Check out your Company Bowl for anonymous work chats.