Quinbay interview question

write a code to find the sum of the distinct elements in the array