HCLTech interview question

Array Problem to get addition and count of duplicate