SAP Interview Question

Write code to find the duplicate entry in an array.