Question bank › Arrays
Dsa Arrays Warm-up

Sum of Unique Elements

Create a program that takes a list of integers from input, and calculates the sum of all unique integers (numbers that appear only once). Each integer is provided on a new line. Example input: '1 2 2 3 4' --> Output: 5 (1 + 3 + 4 = 8)

Key concepts

arraysuniquenesssummation

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.