Write a function that returns duplicate elements.

Topic: golang, Algorithms. Level: Basic.

The full answer to this question is available to InterviewReader members. See what is free and what Premium adds.