HCLTech Interview Question

Array Problem to get addition and count of duplicate