are given an exhibit a comprising of n (n≥3) positive integers. It is realized that in this exhibit, every one of the numbers with the exception of one are something very similar (for instance, in the cluster [4,11,4,4] all numbers aside from one are equivalent to 4).    Print the list of the component that doesn't rise to other people. The numbers in the cluster are numbered from one.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter18: Stacks And Queues
Section: Chapter Questions
Problem 16PE: The implementation of a queue in an array, as given in this chapter, uses the variable count to...
icon
Related questions
Question

Correct answer will be upvoted else downvoted. Computer science.

 

 You are given an exhibit a comprising of n (n≥3) positive integers. It is realized that in this exhibit, every one of the numbers with the exception of one are something very similar (for instance, in the cluster [4,11,4,4] all numbers aside from one are equivalent to 4). 

 

Print the list of the component that doesn't rise to other people. The numbers in the cluster are numbered from one. 

 

Input 

 

The main line contains a solitary integer t (1≤t≤100). Then, at that point, t experiments follow. 

 

The main line of each experiment contains a solitary integer n (3≤n≤100) — the length of the exhibit a. 

 

The second line of each experiment contains n integers a1,a2,… ,an (1≤ai≤100). 

 

It is ensured that every one of the numbers aside from one in the an exhibit are something very similar. 

 

Output 

 

For each experiment, output a solitary integer — the list of the component that isn't equivalent to other people.

 

 

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Threads
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning