Infosys interview question

Sort unsorted Array and find duplicates