Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
1,154 views
Given an array 'A' of size 'N' ; find the sum of xor of all pairs of the given array .

 

1<=N<=100000

1<=a[i]<=100000000

 

Input :

5

2 7 1 5 8

Output : 2xor7 + 2xor1 + 2xor5 + 2xor8 + 7xor1 + 7xor5 + 7xor8 + 1xor5 + 1xor8 + 5xor8 = 74
in Online Assessments by Expert (107,890 points)
edited by | 1,154 views

Please log in or register to answer this question.

Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .