RenderPub Interview Question

Find the duplicate element in an array